Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix broken hover in WebKit after moving map

  • Loading branch information...
commit e159425a6ad2db2b62429c0aa253727b78b1f8b6 1 parent 790f12e
@geary authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 code/polygonzo.js
View
11 code/polygonzo.js
@@ -181,8 +181,9 @@ PolyGonzo = {
style.WebkitTransform ||
style.msTransform ||
style.MozTransform ||
- style.OTransform
- );
+ style.OTransform ||
+ ''
+ ).replace( / /g, '' );
};
this.getTransformOffset = function() {
@@ -193,11 +194,11 @@ PolyGonzo = {
if( ! parent ) return null;
var offsetter = parent.offsetParent;
var transform = this.getTransform( offsetter.style );
- var match = transform && transform.match(
- /translate\s*\(\s*(-?\d+)px\s*,\s*(-?\d+)px\s*\)/
+ var match = transform.match(
+ /matrix\(-?\d+,-?\d+,-?\d+,-?\d+,(-?\d+)(px)?,(-?\d+)(px)?\)/
);
var offset = match ?
- { x: +match[1], y: +match[2] } :
+ { x: +match[1], y: +match[3] } :
{ x: offsetter.offsetLeft, y: offsetter.offsetTop };
offset.isTransform = !! match;
return offset;
Please sign in to comment.
Something went wrong with that request. Please try again.