FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
atom/src/input-component.coffee at master · Campos/atom · GitHub
Campos
/
atom
Public
forked from
atom/atom
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
atom
/
src
/
input-component.coffee
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (25 loc) · 984 Bytes
Breadcrumbs
atom
/
src
/
input-component.coffee
Copy path
File metadata and controls
31 lines (25 loc) · 984 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module
.
exports
=
class
InputComponent
constructor
:
->
@domNode
=
document
.
createElement
(
'
input
'
)
@domNode
.
classList
.
add
(
'
hidden-input
'
)
@domNode
.
setAttribute
(
'
data-react-skip-selection-restoration
'
,
true
)
@domNode
.
style
[
'
-webkit-transform
'
]
=
'
translateZ(0)
'
@domNode
.
addEventListener
'
paste
'
, (
event
)
->
event
.
preventDefault
()
getDomNode
:
->
@domNode
updateSync
:
(
state
)
->
@oldState
?=
{}
newState
=
state
.
hiddenInput
if
newState
.
top
isnt
@oldState
.
top
@domNode
.
style
.
top
=
newState
.
top
+
'
px
'
@oldState
.
top
=
newState
.
top
if
newState
.
left
isnt
@oldState
.
left
@domNode
.
style
.
left
=
newState
.
left
+
'
px
'
@oldState
.
left
=
newState
.
left
if
newState
.
width
isnt
@oldState
.
width
@domNode
.
style
.
width
=
newState
.
width
+
'
px
'
@oldState
.
width
=
newState
.
width
if
newState
.
height
isnt
@oldState
.
height
@domNode
.
style
.
height
=
newState
.
height
+
'
px
'
@oldState
.
height
=
newState
.
height
Back
|
FazBrowse Home
|
New Git URL