Merge pull request #2574 from tohaocean/patch-1
Opera does not support translate3d property
This commit is contained in:
commit
cac1494f64
@ -140,10 +140,13 @@ L.DomUtil = {
|
||||
},
|
||||
|
||||
setTransform: function (el, offset, scale) {
|
||||
var pos = offset || new L.Point(0, 0);
|
||||
var pos = offset || new L.Point(0, 0),
|
||||
is3d = L.Browser.webkit3d,
|
||||
open = 'translate' + (is3d ? '3d' : '') + '(',
|
||||
close = (is3d ? ',0' : '') + ')';
|
||||
|
||||
el.style[L.DomUtil.TRANSFORM] =
|
||||
'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' + (scale ? ' scale(' + scale + ')' : '');
|
||||
open + pos.x + 'px,' + pos.y + 'px' + close + (scale ? ' scale(' + scale + ')' : '');
|
||||
},
|
||||
|
||||
setPosition: function (el, point, no3d) { // (HTMLElement, Point[, Boolean])
|
||||
|
Loading…
Reference in New Issue
Block a user