Fix transformRe (fixes #1658)
Allow optional units in the transformation matrix, the presence of which causes maxBounds settings not to work in (at least) older versions of Firefox. Also update the regex to match on numbers per W3 spec: "A number is either an <integer> or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits." (from CSS Values and Units Module Level 3)
This commit is contained in:
parent
38c1164152
commit
06842ef659
@ -49,7 +49,7 @@ L.PosAnimation = L.Class.extend({
|
||||
// you can't easily get intermediate values of properties animated with CSS3 Transitions,
|
||||
// we need to parse computed style (in case of transform it returns matrix string)
|
||||
|
||||
_transformRe: /(-?[\d\.]+), (-?[\d\.]+)\)/,
|
||||
_transformRe: /([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,
|
||||
|
||||
_getPos: function () {
|
||||
var left, top, matches,
|
||||
|
Loading…
Reference in New Issue
Block a user