1
0
Fork 0
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:
fchasen 2015-09-15 09:04:35 -04:00
parent 4233ca889e
commit 4ab8805c8e
9 changed files with 13 additions and 9 deletions

View file

@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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

View file

@ -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);
}

View file

@ -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);
}