Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
f333e64f
Commit
f333e64f
authored
Apr 06, 2018
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make `Adder#showAt` a method
parent
495e4e2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
41 deletions
+41
-41
adder.js
src/annotator/adder.js
+41
-41
No files found.
src/annotator/adder.js
View file @
f333e64f
...
@@ -240,6 +240,7 @@ class Adder {
...
@@ -240,6 +240,7 @@ class Adder {
return
{
top
,
left
,
arrowDirection
};
return
{
top
,
left
,
arrowDirection
};
};
};
}
/**
/**
* Show the adder at the given position and with the arrow pointing in
* Show the adder at the given position and with the arrow pointing in
...
@@ -248,7 +249,7 @@ class Adder {
...
@@ -248,7 +249,7 @@ class Adder {
* @param {number} left - Horizontal offset from left edge of viewport.
* @param {number} left - Horizontal offset from left edge of viewport.
* @param {number} top - Vertical offset from top edge of viewport.
* @param {number} top - Vertical offset from top edge of viewport.
*/
*/
this
.
showAt
=
(
left
,
top
,
arrowDirection
)
=>
{
showAt
(
left
,
top
,
arrowDirection
)
{
this
.
element
.
className
=
classnames
({
this
.
element
.
className
=
classnames
({
'annotator-adder'
:
true
,
'annotator-adder'
:
true
,
'annotator-adder--arrow-down'
:
arrowDirection
===
ARROW_POINTING_DOWN
,
'annotator-adder--arrow-down'
:
arrowDirection
===
ARROW_POINTING_DOWN
,
...
@@ -282,7 +283,6 @@ class Adder {
...
@@ -282,7 +283,6 @@ class Adder {
this
.
_enterTimeout
=
setTimeout
(()
=>
{
this
.
_enterTimeout
=
setTimeout
(()
=>
{
this
.
element
.
className
+=
' is-active'
;
this
.
element
.
className
+=
' is-active'
;
},
1
);
},
1
);
};
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment