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
10dafb0e
Commit
10dafb0e
authored
Nov 23, 2012
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved cross-browser compatibility.
parent
280fad95
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
annotator.host.coffee
h/js/src/annotator.host.coffee
+0
-2
hypothesis.coffee
h/js/src/hypothesis.coffee
+7
-9
No files found.
h/js/src/annotator.host.coffee
View file @
10dafb0e
...
...
@@ -107,8 +107,6 @@ class Annotator.Host extends Annotator
Math
.
max
.
apply
(
Math
,
all
)
scrollTop
:
(
y
)
=>
$
(
'html, body'
).
stop
().
animate
{
scrollTop
:
y
},
600
debounce
:
(
fn
,
delay
)
=>
util
.
debounce
(
fn
,
delay
)
remote
:
publish
:
{}
addPlugin
:
{}
...
...
h/js/src/hypothesis.coffee
View file @
10dafb0e
...
...
@@ -70,7 +70,6 @@ class Hypothesis extends Annotator
setActiveHighlights
:
{}
getMaxBottom
:
{}
scrollTop
:
{}
debounce
:
{}
# Prepare a MarkDown renderer, and add some post-processing
# so that all created links have their target set to _blank
...
...
@@ -129,15 +128,14 @@ class Hypothesis extends Annotator
if
@
viewer
.
isShown
()
and
@
bucket
==
-
1
this
.
_fillDynamicBucket
()
this
.
show
()
document
.
getElement
ById
(
'toolbar'
)
.
addEventListener
'dragstart'
,
(
event
)
=>
document
.
getElement
sByClassName
(
'tri'
)[
0
]
.
addEventListener
'dragstart'
,
(
event
)
=>
@
dragstartposX
=
event
.
screenX
document
.
getElementById
(
'toolbar'
).
addEventListener
'drag'
,
(
event
,
ui
)
=>
@
provider
.
debounce
(
=>
@
provider
.
addtoFrameWidth
(
@
dragstartposX
-
event
.
screenX
,
window
.
innerWidth
)
@
dragstartposX
=
event
.
screenX
,
250
)
document
.
getElementById
(
'toolbar'
).
addEventListener
'dragend'
,
(
event
)
=>
@
provider
.
addtoFrameWidth
(
@
dragstartposX
-
event
.
screenX
,
window
.
innerWidth
)
document
.
getElementById
(
'toolbar'
).
addEventListener
'drag'
,
(
event
)
=>
if
event
.
screenX
>
0
@
provider
.
addtoFrameWidth
((
@
dragstartposX
-
event
.
screenX
),
window
.
innerWidth
)
@
dragstartposX
=
event
.
screenX
this
_setupDynamicStyle
:
->
...
...
@@ -564,7 +562,7 @@ class Hypothesis extends Annotator
@
provider
.
setActiveHighlights
annotations
@
provider
.
showFrame
()
$
(
"#toolbar"
).
addClass
"shown"
$
(
"#toolbar"
)
.
draggable
=
true
document
.
getElementsByClassName
(
'tri'
)[
0
]
.
draggable
=
true
hide
:
=>
@
lastWidth
=
window
.
innerWidth
...
...
@@ -573,7 +571,7 @@ class Hypothesis extends Annotator
@
provider
.
resetFrameWidth
()
@
provider
.
hideFrame
()
$
(
"#toolbar"
).
removeClass
"shown"
$
(
"#toolbar"
)
.
draggable
=
false
document
.
getElementsByClassName
(
'tri'
)[
0
]
.
draggable
=
false
threadId
:
(
annotation
)
->
if
annotation
?
.
thread
?
...
...
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