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
c9a615d4
Commit
c9a615d4
authored
Apr 10, 2014
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't propagate mouseUp events from the toolbar. Fixes #1169
parent
e911d933
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
toolbar.coffee
h/js/plugin/toolbar.coffee
+5
-0
No files found.
h/js/plugin/toolbar.coffee
View file @
c9a615d4
...
@@ -21,6 +21,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -21,6 +21,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
window
.
annotator
.
showFrame
()
window
.
annotator
.
showFrame
()
else
else
window
.
annotator
.
hideFrame
()
window
.
annotator
.
hideFrame
()
"mouseup"
:
(
event
)
->
event
.
stopPropagation
()
,
,
"title"
:
"Show Annotations"
"title"
:
"Show Annotations"
"class"
:
"alwaysonhighlights-icon"
"class"
:
"alwaysonhighlights-icon"
...
@@ -29,6 +30,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -29,6 +30,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
event
.
stopPropagation
()
event
.
stopPropagation
()
state
=
not
window
.
annotator
.
visibleHighlights
state
=
not
window
.
annotator
.
visibleHighlights
window
.
annotator
.
setVisibleHighlights
state
window
.
annotator
.
setVisibleHighlights
state
"mouseup"
:
(
event
)
->
event
.
stopPropagation
()
,
,
"title"
:
"Highlighting Mode"
"title"
:
"Highlighting Mode"
"class"
:
"highlighter-icon"
"class"
:
"highlighter-icon"
...
@@ -38,6 +40,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -38,6 +40,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
state
=
not
(
window
.
annotator
.
tool
is
'highlight'
)
state
=
not
(
window
.
annotator
.
tool
is
'highlight'
)
tool
=
if
state
then
'highlight'
else
'comment'
tool
=
if
state
then
'highlight'
else
'comment'
window
.
annotator
.
setTool
tool
window
.
annotator
.
setTool
tool
"mouseup"
:
(
event
)
->
event
.
stopPropagation
()
,
,
"title"
:
"New Comment"
"title"
:
"New Comment"
"class"
:
"commenter-icon"
"class"
:
"commenter-icon"
...
@@ -45,6 +48,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -45,6 +48,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
event
.
preventDefault
()
event
.
preventDefault
()
event
.
stopPropagation
()
event
.
stopPropagation
()
window
.
annotator
.
addComment
()
window
.
annotator
.
addComment
()
"mouseup"
:
(
event
)
->
event
.
stopPropagation
()
]
]
pluginInit
:
->
pluginInit
:
->
...
@@ -59,6 +63,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -59,6 +63,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
.
attr
(
'href'
,
''
)
.
attr
(
'href'
,
''
)
.
attr
(
'title'
,
item
.
title
)
.
attr
(
'title'
,
item
.
title
)
.
on
(
'click'
,
item
.
click
)
.
on
(
'click'
,
item
.
click
)
.
on
(
'mouseup'
,
item
.
mouseup
)
.
addClass
(
item
.
class
)
.
addClass
(
item
.
class
)
button
=
$
(
'<li></li>'
).
append
(
anchor
)
button
=
$
(
'<li></li>'
).
append
(
anchor
)
buttons
.
add
button
buttons
.
add
button
...
...
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