mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-30 03:30:09 +00:00
test with 3d transform disabled...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
81d398f0c9
commit
f9b536716e
@ -195,9 +195,12 @@ function unanimated(obj, func, time){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var USE_3D_TRANSFORM = false
|
||||||
|
|
||||||
// NOTE: at this point this works only on the X axis...
|
// NOTE: at this point this works only on the X axis...
|
||||||
function setElementTransform(elem, offset, scale){
|
function setElementTransform(elem, offset, scale){
|
||||||
elem = $(elem)
|
elem = $(elem)
|
||||||
|
var t3d = USE_3D_TRANSFORM ? 'translateZ(0px)' : ''
|
||||||
if(offset == null){
|
if(offset == null){
|
||||||
offset = getElementShift(elem)
|
offset = getElementShift(elem)
|
||||||
// number -- only the x coord...
|
// number -- only the x coord...
|
||||||
@ -217,7 +220,7 @@ function setElementTransform(elem, offset, scale){
|
|||||||
var scale = getElementScale(elem)
|
var scale = getElementScale(elem)
|
||||||
}
|
}
|
||||||
if(USE_TRANSFORM){
|
if(USE_TRANSFORM){
|
||||||
var transform = 'translate('+ offset.left +'px, '+ offset.top +'px) scale('+ scale +') translateZ(0px)'
|
var transform = 'translate('+ offset.left +'px, '+ offset.top +'px) scale('+ scale +') ' + t3d
|
||||||
elem.css({
|
elem.css({
|
||||||
'-ms-transform' : transform,
|
'-ms-transform' : transform,
|
||||||
'-webkit-transform' : transform,
|
'-webkit-transform' : transform,
|
||||||
@ -231,7 +234,7 @@ function setElementTransform(elem, offset, scale){
|
|||||||
top: ''
|
top: ''
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
var transform = 'translate(0px, 0px) scale('+ scale +') translateZ(0px)'
|
var transform = 'translate(0px, 0px) scale('+ scale +') ' + t3d
|
||||||
elem.css({
|
elem.css({
|
||||||
// NOTE: this will be wrong during a transition, that's why we
|
// NOTE: this will be wrong during a transition, that's why we
|
||||||
// can pass the pre-calculated offset as an argument...
|
// can pass the pre-calculated offset as an argument...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user