mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Update Hypothes.is integration.
This commit is contained in:
parent
3e88ee40af
commit
bcd32ce6ce
4 changed files with 18 additions and 20 deletions
|
@ -37,12 +37,7 @@ EPUBJS.reader.plugins.HypothesisController = function(Book) {
|
|||
};
|
||||
|
||||
var attach = function(){
|
||||
|
||||
annotator = window.annotator = new window.Annotator.Host(body, {
|
||||
"app": "https://hypothes.is/app/",
|
||||
"Toolbar": {container:"#annotator-toolbar"}
|
||||
});
|
||||
|
||||
annotator = window.annotator;
|
||||
annotator.frame.appendTo(element);
|
||||
|
||||
annotator.subscribe('annotationEditorShown', function () {
|
||||
|
@ -83,7 +78,7 @@ EPUBJS.reader.plugins.HypothesisController = function(Book) {
|
|||
reader.book.on("renderer:locationChanged", function(){
|
||||
updateAnnotations();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
var showAnnotations = function(single) {
|
||||
|
@ -106,9 +101,9 @@ EPUBJS.reader.plugins.HypothesisController = function(Book) {
|
|||
|
||||
book.ready.all.then(function() {
|
||||
reader.HypothesisController.attach();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
return {
|
||||
"attach" : attach
|
||||
'attach': attach
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue