Skip to content

Commit

Permalink
"annotations" plugin was renamed "highlights", see readium/SDKLaunche…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweck committed Nov 15, 2016
1 parent 23ab37e commit df7f819
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions LauncherOSX/ReaderScripts/host_app_feedback.js
Expand Up @@ -196,16 +196,16 @@ require(['readium_shared_js/views/reader_view'], function (ReaderView)
ReadiumSDK.on(ReadiumSDK.Events.PLUGINS_LOADED, function(reader)
{
// readium built-in (should have been require()'d outside this scope)
console.log(reader.plugins.annotations);
if (reader.plugins.annotations) {
reader.plugins.annotations.initialize({annotationCSSUrl: opts.annotationCSSUrl});
reader.plugins.annotations.on("annotationClicked", function(type, idref, cfi, id) {
console.log(reader.plugins.highlights);
if (reader.plugins.highlights) {
reader.plugins.highlights.initialize({annotationCSSUrl: opts.annotationCSSUrl});
reader.plugins.highlights.on("annotationClicked", function(type, idref, cfi, id) {
console.log("ANNOTATION CLICK: " + id);
reader.plugins.annotations.removeHighlight(id);
reader.plugins.highlights.removeHighlight(id);
});
reader.plugins.annotations.on("textSelectionEvent", function() {
reader.plugins.highlights.on("textSelectionEvent", function() {
console.log("ANNOTATION SELECT");
reader.plugins.annotations.addSelectionHighlight(Math.floor((Math.random()*1000000)), "highlight");
reader.plugins.highlights.addSelectionHighlight(Math.floor((Math.random()*1000000)), "highlight");
});
}

Expand Down

0 comments on commit df7f819

Please sign in to comment.