From 4b757fe2cd7991b00279ee6794b3ddce2593dbf4 Mon Sep 17 00:00:00 2001 From: Mstislav Zhivodkov Date: Mon, 6 Apr 2015 18:00:44 +0600 Subject: [PATCH] change translate3d detection --- src/core/Browser.js | 1 + src/dom/DomUtil.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/Browser.js b/src/core/Browser.js index f3ded60a..b808b87f 100644 --- a/src/core/Browser.js +++ b/src/core/Browser.js @@ -35,6 +35,7 @@ android23: android23, chrome: chrome, safari: !chrome && ua.indexOf('safari') !== -1, + opera12: opera3d, ie3d: ie3d, webkit3d: webkit3d, diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index b927ac10..13b632e1 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -141,9 +141,9 @@ L.DomUtil = { setTransform: function (el, offset, scale) { var pos = offset || new L.Point(0, 0), - is3d = L.Browser.webkit3d, - open = 'translate' + (is3d ? '3d' : '') + '(', - close = (is3d ? ',0' : '') + ')'; + is3d = !L.Browser.opera12, + open = 'translate' + (is3d ? '3d' : '') + '(', + close = (is3d ? ',0' : '') + ')'; el.style[L.DomUtil.TRANSFORM] = open + pos.x + 'px,' + pos.y + 'px' + close + (scale ? ' scale(' + scale + ')' : '');