Skip to content

Instantly share code, notes, and snippets.

@p0rsche
Created January 9, 2018 21:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p0rsche/bf9f43c4716cff3f1e6ad3e587e829aa to your computer and use it in GitHub Desktop.
Save p0rsche/bf9f43c4716cff3f1e6ad3e587e829aa to your computer and use it in GitHub Desktop.
getTransformToElement polyfill
SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(toElement) {
return toElement.getScreenCTM().inverse().multiply(this.getScreenCTM());
};
@jt3k
Copy link

jt3k commented Dec 23, 2022

hi from https://stackoverflow.com/a/28855697
polyfill still works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment