-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update svgcanvas.js #57
Conversation
correct #54
So we don't know why this doesn't work in IE but we can just skip doing the offset? |
For info : this patch master...StalderT:patch-4 doesn't work : |
With patch master...StalderT:patch-4 : |
if (typeof(svgroot.getIntersectionList) == 'function') { | ||
// Offset the bbox of the rubber box by the offset of the svgcontent element. | ||
rubberBBox.x += parseInt(svgcontent.getAttribute('x'), 10); | ||
rubberBBox.y += parseInt(svgcontent.getAttribute('y'), 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether the root of the problem is modifying x
/y
in place. At least that's what the error seems to imply.
Perhaps instead svgcontent.createSVGRect
should be invoked here similarly to line 553 above?
This fixes the "interface" problem StalderT describes: [https://github.com/magnebra/svgedit/commit/88ef7b02cc1325451e86a4298f9cc3d917f437de] |
It looks more like a workaround specifically for IE. I wonder whether the code instead of creating empty rect and modifying that instance should calculate the rect coords, and then create the rect with those coords? Look at the error: Note also from MDN/SVGRect:
My suspicion is that the error is not really related to IE. You can see there are multiple branches in this So the suggestion is to avoid modifying existing SVGRect and in all cases create a new instance. Does it make sense? |
Fixes #53: 4th option for the background display fixed
correct #54