code: function(x, y) {
  
              var svg = this.svg().node;
              
              var p = svg.createSVGPoint();
              p.x = x;
              p.y = y;
  
  	    try {
  
  		var globalPoint = p.matrixTransform(svg.getScreenCTM().inverse());
  		var globalToLocalMatrix = this.node.getTransformToElement(svg).inverse();
  
  	    } catch(e) {
  		// IE9 throws an exception in odd cases. (`Unexpected call to method or property access`)
  		// We have to make do with the original coordianates.
  		return p;
  	    }
  
              return globalPoint.matrixTransform(globalToLocalMatrix);
          }
docs: Convert global point into the coordinate space of this element.