Skip to content

Commit

Permalink
v0.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-buckley committed Jun 11, 2015
1 parent 9dedc6e commit 8403af4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmh/readium",
"version": "0.4.7",
"version": "0.4.8",
"description": "readium",
"main": "src/index.js",
"readme": "README.md",
Expand Down
8 changes: 7 additions & 1 deletion src/epub-annotations/hmh-annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ var ReflowableAnnotations = Backbone.Model.extend({
this.rangy.init();
this.annotationsActions = window.rceReadiumBridge.annotations.actions;
this.annotationsStore = window.rceReadiumBridge.annotations.store;
this.tocStore = window.rceReadiumBridge.toc.store;

var self = this;


window.rceReadiumBridge.annotations.isReady(function(list) {


//console.log('annotations are ready -> list', list.toJS());

var ePubIframe = self.get("contentDocumentDOM");
Expand Down Expand Up @@ -217,6 +219,8 @@ var ReflowableAnnotations = Backbone.Model.extend({
//safer/more reliable to get the objectID from the CFI
objectId = this.getObjectIdFromCFI(cfi);

//getLocation
//debugger;

var highlightDetails = {
text: range.toString(),
Expand All @@ -225,10 +229,12 @@ var ReflowableAnnotations = Backbone.Model.extend({
contentId: this.bookStore.metadata.result.isbn,
style: 'hmh-highlight-default',
color: '#f6d855',
path: cfi,
path: this.tocStore.activeNode.toJS().id + '#' + cfi,
rangySerialized: serializedRange
};

//debugger;

this.tempListener = this.annotationsStore.addChangeListener(this.updateTempHighlightId.bind(this));
this.annotationsActions.add(highlightDetails);

Expand Down

0 comments on commit 8403af4

Please sign in to comment.