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
904addb8
Commit
904addb8
authored
Sep 19, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fire annotation(Editor|Viewer)Shown events
parent
9ab4a6e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
controllers.coffee
h/js/controllers.coffee
+3
-2
host.coffee
h/js/host.coffee
+14
-2
No files found.
h/js/controllers.coffee
View file @
904addb8
...
...
@@ -97,14 +97,15 @@ class App
$scope
.
reloadAnnotations
()
$scope
.
$watch
'frame.visible'
,
(
newValue
,
oldValue
)
->
routeName
=
$location
.
path
().
replace
/^\//
,
''
if
newValue
annotator
.
show
()
annotator
.
host
.
notify
method
:
'showFrame'
annotator
.
host
.
notify
method
:
'showFrame'
,
params
:
routeName
$element
.
find
(
'.topbar'
).
find
(
'.tri'
).
attr
(
'draggable'
,
true
)
else
if
oldValue
$scope
.
sheet
.
collapsed
=
true
annotator
.
hide
()
annotator
.
host
.
notify
method
:
'hideFrame'
annotator
.
host
.
notify
method
:
'hideFrame'
,
params
:
routeName
for
p
in
annotator
.
providers
p
.
channel
.
notify
method
:
'setActiveHighlights'
$element
.
find
(
'.topbar'
).
find
(
'.tri'
).
attr
(
'draggable'
,
false
)
...
...
h/js/host.coffee
View file @
904addb8
...
...
@@ -45,17 +45,29 @@ class Annotator.Host extends Annotator.Guest
channel
.
bind
(
'showFrame'
,
=>
.
bind
(
'showFrame'
,
(
ctx
,
routeName
)
=>
unless
@
drag
.
enabled
@
frame
.
css
'margin-left'
:
"
#{
-
1
*
@
frame
.
width
()
}
px"
@
frame
.
removeClass
'annotator-no-transition'
@
frame
.
removeClass
'annotator-collapsed'
switch
routeName
when
'editor'
this
.
publish
'annotationEditorShown'
when
'viewer'
this
.
publish
'annotationViewerShown'
)
.
bind
(
'hideFrame'
,
=>
.
bind
(
'hideFrame'
,
(
ctx
,
routeName
)
=>
@
frame
.
css
'margin-left'
:
''
@
frame
.
removeClass
'annotator-no-transition'
@
frame
.
addClass
'annotator-collapsed'
switch
routeName
when
'editor'
this
.
publish
'annotationEditorHidden'
when
'viewer'
this
.
publish
'annotationViewerHidden'
)
.
bind
(
'dragFrame'
,
(
ctx
,
screenX
)
=>
this
.
_dragUpdate
screenX
)
...
...
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