mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Moved the logic of idenitfying fragment to content.js
This commit is contained in:
parent
c0533232d6
commit
88fd89935d
2 changed files with 5 additions and 14 deletions
|
@ -239,18 +239,7 @@ class Rendition {
|
|||
return displayed;
|
||||
}
|
||||
|
||||
// Trim the target fragment
|
||||
// removing the chapter
|
||||
if(!isCfiString && typeof target === "string" &&
|
||||
target.indexOf("#") > -1) {
|
||||
moveTo = target.substring(target.indexOf("#")+1);
|
||||
}
|
||||
|
||||
if (isCfiString) {
|
||||
moveTo = target;
|
||||
}
|
||||
|
||||
return this.manager.display(section, moveTo)
|
||||
return this.manager.display(section, target)
|
||||
.then(function(){
|
||||
// this.emit("displayed", section);
|
||||
}.bind(this));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue