Permalink
Browse files

Fix svg intersection checking code

  • Loading branch information...
1 parent c338959 commit e3ec4b23a2162015de43625c56a96e4b629d0998 @davidaurelio davidaurelio committed Feb 28, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/renderer/svg/check_intersection.js
@@ -13,7 +13,7 @@ define(function() {
svgRect.x = svgRect.y = 0;
try { // Gecko throws an error
// Opera/Presto needs the second argument. Older WebKits return null.
- hasSupport = !!svg.getIntersectionList(rect, null);
+ hasSupport = !!svgElement.getIntersectionList(svgRect, null);
} catch (e) {
hasSupport = false;
}
@@ -23,7 +23,7 @@ define(function() {
return function(svgElement, x, y) {
if (hasSupport === undefined) {
- checkSupport();
+ checkSupport(svgElement);
}
if (!hasSupport) {
@@ -34,7 +34,7 @@ define(function() {
svgRect.y = y;
// second argument needed for Opera/Presto
- var elementsUnderPoint = svgElememt.getIntersectionList(svgRect, null);
+ var elementsUnderPoint = svgElement.getIntersectionList(svgRect, null);
var numElements = elementsUnderPoint.length;
if (!numElements) { return null; }

0 comments on commit e3ec4b2

Please sign in to comment.