Avoid error if transform happens to be 'none'

Fixes #1707
This commit is contained in:
John Firebaugh 2013-06-24 14:56:22 -04:00
parent 2c22d13ab8
commit 18e3277f8b

View File

@ -58,8 +58,8 @@ L.PosAnimation = L.Class.extend({
if (L.Browser.any3d) {
matches = style[L.DomUtil.TRANSFORM].match(this._transformRe);
left = parseFloat(matches[1]);
top = parseFloat(matches[2]);
left = matches ? parseFloat(matches[1]) : 0;
top = matches ? parseFloat(matches[2]) : 0;
} else {
left = parseFloat(style.left);
top = parseFloat(style.top);