mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Mobile setLeft transform prefixed for Firefox, IE instead of just Webkit.
This commit is contained in:
parent
4233ca889e
commit
4ab8805c8e
9 changed files with 13 additions and 9 deletions
|
@ -6220,6 +6220,7 @@ EPUBJS.Render.Iframe = function() {
|
|||
this.pageWidth = 0;
|
||||
|
||||
this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g);
|
||||
this.transform = EPUBJS.core.prefixed('transform');
|
||||
};
|
||||
|
||||
//-- Build up any html needed
|
||||
|
@ -6381,7 +6382,7 @@ EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
|
|||
// this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
|
||||
if (this.isMobile) {
|
||||
this.docEl.style["-webkit-transform"] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
} else {
|
||||
this.document.defaultView.scrollTo(leftPos, 0);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
2
build/epub.min.js
vendored
2
build/epub.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6219,6 +6219,7 @@ EPUBJS.Render.Iframe = function() {
|
|||
this.pageWidth = 0;
|
||||
|
||||
this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g);
|
||||
this.transform = EPUBJS.core.prefixed('transform');
|
||||
};
|
||||
|
||||
//-- Build up any html needed
|
||||
|
@ -6380,7 +6381,7 @@ EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
|
|||
// this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
|
||||
if (this.isMobile) {
|
||||
this.docEl.style["-webkit-transform"] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
} else {
|
||||
this.document.defaultView.scrollTo(leftPos, 0);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
reader/js/epub.min.js
vendored
3
reader/js/epub.min.js
vendored
|
@ -6220,6 +6220,7 @@ EPUBJS.Render.Iframe = function() {
|
|||
this.pageWidth = 0;
|
||||
|
||||
this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g);
|
||||
this.transform = EPUBJS.core.prefixed('transform');
|
||||
};
|
||||
|
||||
//-- Build up any html needed
|
||||
|
@ -6381,7 +6382,7 @@ EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
|
|||
// this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
|
||||
if (this.isMobile) {
|
||||
this.docEl.style["-webkit-transform"] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
} else {
|
||||
this.document.defaultView.scrollTo(leftPos, 0);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ EPUBJS.Render.Iframe = function() {
|
|||
this.pageWidth = 0;
|
||||
|
||||
this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g);
|
||||
this.transform = EPUBJS.core.prefixed('transform');
|
||||
};
|
||||
|
||||
//-- Build up any html needed
|
||||
|
@ -170,7 +171,7 @@ EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
|
|||
// this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
|
||||
if (this.isMobile) {
|
||||
this.docEl.style["-webkit-transform"] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)';
|
||||
} else {
|
||||
this.document.defaultView.scrollTo(leftPos, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue