Skip to content

Commit

Permalink
Added Opera 10+ CSS3 transforms, transitions
Browse files Browse the repository at this point in the history
Added support for CSS3 transforms and transitions in Opera 10+ for
Windows, which enables double tap zoom and better animation.
  • Loading branch information
thorstein5 committed Oct 7, 2012
1 parent bbdf168 commit a5da942
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/carousel.class.animation.js
Expand Up @@ -80,7 +80,7 @@

if (Util.Browser.isCSSTransformSupported){

transform = Util.coalesce(this.contentEl.style.webkitTransform, this.contentEl.style.MozTransform, this.contentEl.style.transform, '');
transform = Util.coalesce(this.contentEl.style.webkitTransform, this.contentEl.style.MozTransform, this.contentEl.style.OTransform, this.contentEl.style.transform, '');
if (transform.indexOf('translate3d(' + xVal) === 0){
this.slideByEndHandler();
return;
Expand Down
8 changes: 4 additions & 4 deletions src/lib/code.util-1.0.6/src/animation.js
Expand Up @@ -10,13 +10,13 @@

_applyTransitionDelay: 50,

_transitionEndLabel: (window.document.documentElement.style.webkitTransition !== undefined) ? "webkitTransitionEnd" : "transitionend",
_transitionEndLabel: (window.document.documentElement.style.webkitTransition !== undefined) ? "webkitTransitionEnd" : (window.document.documentElement.style.OTransition !== undefined) ? "oTransitionEnd otransitionend" : "transitionend",

_transitionEndHandler: null,

_transitionPrefix: (window.document.documentElement.style.webkitTransition !== undefined) ? "webkitTransition" : (window.document.documentElement.style.MozTransition !== undefined) ? "MozTransition" : "transition",
_transitionPrefix: (window.document.documentElement.style.webkitTransition !== undefined) ? "webkitTransition" : (window.document.documentElement.style.MozTransition !== undefined) ? "MozTransition" : (window.document.documentElement.style.OTransition !== undefined) ? "OTransition" : "transition",

_transformLabel: (window.document.documentElement.style.webkitTransform !== undefined) ? "webkitTransform" : (window.document.documentElement.style.MozTransition !== undefined) ? "MozTransform" : "transform",
_transformLabel: (window.document.documentElement.style.webkitTransform !== undefined) ? "webkitTransform" : (window.document.documentElement.style.MozTransform !== undefined) ? "MozTransform" : (window.document.documentElement.style.OTransform !== undefined) ? "OTransform" : "transform",


/*
Expand Down Expand Up @@ -249,7 +249,7 @@
property = el.style[this._transitionPrefix + 'Property'],
callbackLabel = (property !== '') ? 'ccl' + property + 'callback' : 'cclallcallback',
callback,
transform = Util.coalesce(el.style.webkitTransform, el.style.MozTransform, el.style.transform),
transform = Util.coalesce(el.style.webkitTransform, el.style.MozTransform, el.style.OTransform, el.style.transform),
transformMatch,
transformExploded,
domX = window.parseInt(Util.DOM.getStyle(el, 'left'), 0),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/code.util-1.0.6/src/browser.js
Expand Up @@ -49,7 +49,7 @@

var testEl = document.createElement('div');
this.is3dSupported = !Util.isNothing(testEl.style.WebkitPerspective);
this.isCSSTransformSupported = ( !Util.isNothing(testEl.style.WebkitTransform) || !Util.isNothing(testEl.style.MozTransform) || !Util.isNothing(testEl.style.transformProperty) );
this.isCSSTransformSupported = ( !Util.isNothing(testEl.style.WebkitTransform) || !Util.isNothing(testEl.style.MozTransform) || !Util.isNothing(testEl.style.OTransform) || !Util.isNothing(testEl.style.transformProperty) );
this.isTouchSupported = this.isEventSupported('touchstart');
this.isGestureSupported = this.isEventSupported('gesturestart');

Expand Down
3 changes: 2 additions & 1 deletion src/zoompanrotate.class.js
Expand Up @@ -133,7 +133,7 @@
setStartingTranslateFromCurrentTransform: function(){

var
transformValue = Util.coalesce(this.transformEl.style.webkitTransform, this.transformEl.style.MozTransform, this.transformEl.style.transform),
transformValue = Util.coalesce(this.transformEl.style.webkitTransform, this.transformEl.style.MozTransform, this.transformEl.style.OTransform, this.transformEl.style.transform),
transformExploded;

if (!Util.isNothing(transformValue)){
Expand Down Expand Up @@ -297,6 +297,7 @@
webkitTransform: transform,
MozTransform: transform,
msTransform: transform,
OTransform: transform,
transform: transform
});

Expand Down

0 comments on commit a5da942

Please sign in to comment.