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
ea8294e9
Commit
ea8294e9
authored
Jun 27, 2017
by
Juan Corona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read the showHighlights config at the Guest level and apply the state there
parent
4dff8d67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
guest.coffee
src/annotator/guest.coffee
+5
-1
host.coffee
src/annotator/host.coffee
+0
-3
No files found.
src/annotator/guest.coffee
View file @
ea8294e9
...
...
@@ -92,7 +92,7 @@ module.exports = class Guest extends Delegator
this
.
addPlugin
(
'CrossFrame'
,
cfOptions
)
@
crossframe
=
this
.
plugins
.
CrossFrame
@
crossframe
.
onConnect
(
=>
this
.
publish
(
'panelReady'
))
@
crossframe
.
onConnect
(
=>
this
.
_setupInitialState
(
config
))
this
.
_connectAnnotationSync
(
@
crossframe
)
this
.
_connectAnnotationUISync
(
@
crossframe
)
...
...
@@ -135,6 +135,10 @@ module.exports = class Guest extends Delegator
return
Promise
.
all
([
metadataPromise
,
uriPromise
]).
then
([
metadata
,
href
])
->
return
{
uri
:
normalizeURI
(
href
,
baseURI
),
metadata
}
_setupInitialState
:
(
config
)
->
this
.
publish
(
'panelReady'
)
this
.
setVisibleHighlights
(
config
.
showHighlights
==
'always'
)
_connectAnnotationSync
:
(
crossframe
)
->
this
.
subscribe
'annotationDeleted'
,
(
annotation
)
=>
this
.
detach
(
annotation
)
...
...
src/annotator/host.coffee
View file @
ea8294e9
...
...
@@ -51,9 +51,6 @@ module.exports = class Host extends Guest
app
.
appendTo
(
@
frame
)
this
.
on
'panelReady'
,
=>
# Initialize tool state.
this
.
setVisibleHighlights
(
config
.
showHighlights
==
'always'
)
# Show the UI
@
frame
.
css
(
'display'
,
''
)
...
...
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