Skip to content

Commit

Permalink
Merge pull request #94 from d-i-t-a/develop
Browse files Browse the repository at this point in the history
v1.3.3 several fixes
  • Loading branch information
aferditamuriqi authored Nov 19, 2020
2 parents 3960c28 + bd7a94f commit 54dd992
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 148 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@d-i-t-a/reader",
"version": "1.3.2",
"version": "1.3.3",
"description": "A viewer application for EPUB files.",
"repository": "https://github.com/d-i-t-a/R2D2BC",
"license": "Apache-2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export async function load(config: ReaderConfig): Promise<any> {
tts: config.tts,
injectables: config.injectables,
selectionMenuItems: config.selectionMenuItems,
initialAnnotationColor: config.initialAnnotationColor
initialAnnotationColor: config.initialAnnotationColor,
attributes: config.attributes
})

// Bookmark Module
Expand Down
12 changes: 3 additions & 9 deletions src/modules/AnnotationModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ export default class AnnotationModule implements ReaderModule {
tocItem = this.publication.getTOCItemAbsolute(this.delegate.currentChapterLink.href);
}

const url = this.publication.getAbsoluteHref(tocItem.href);

const bookmarkPosition = this.delegate.reflowable.getCurrentPosition();

const body = HTMLUtilities.findRequiredIframeElement(this.delegate.iframe.contentDocument, "body") as HTMLBodyElement;
Expand All @@ -222,7 +220,7 @@ export default class AnnotationModule implements ReaderModule {

const annotation: Annotation = {
id: id,
href: url,
href: tocItem.href,
locations: {
progression: progression
},
Expand Down Expand Up @@ -308,9 +306,7 @@ export default class AnnotationModule implements ReaderModule {
tocItem = this.publication.getTOCItemAbsolute(this.delegate.currentChapterLink.href);
}

const url = this.publication.getAbsoluteHref(tocItem.href);

if (annotation.href === url) {
if (annotation.href === tocItem.href) {

this.highlighter.setColor(annotation.color);

Expand Down Expand Up @@ -350,9 +346,7 @@ export default class AnnotationModule implements ReaderModule {
tocItem = this.publication.getTOCItemAbsolute(this.delegate.currentChapterLink.href);
}

const url = this.publication.getAbsoluteHref(tocItem.href);

if (annotation.href === url) {
if (annotation.href === tocItem.href) {

this.highlighter.setColor(annotation.color);

Expand Down
Loading

0 comments on commit 54dd992

Please sign in to comment.