Closed Bug 863205 Opened 11 years ago Closed 10 years ago

"svg-edit"-editor: SVG elements are mis-positioned from the mouse cursor

Categories

(Web Compatibility :: Site Reports, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pauly, Unassigned)

References

()

Details

(Keywords: regression, Whiteboard: [country-all] [js] [svg])

STR:
1. Open http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html
2. Zoom 200%
3. Draw a rectangle or an ellipse

AR:
There is a considerable space between the mouse cursor and the place where the element is actually drawn

This is a regression between FF 12 - 13.
Needs a reduced testcase but it's almost certainly an application error.
Status: NEW → UNCONFIRMED
Ever confirmed: false
Last good nightly: 2012-02-17
First bad nightly: 2012-02-18

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2271cb92cc05&tochange=550779e6bab4
Status: UNCONFIRMED → NEW
Ever confirmed: true
bug 660216 changed our functionality. It was broken before. It looks like the application is relying on the broken behaviour.
This is an application error svgcontent has a viewBox which means its children are subject to a transform. When a zoom is applied then this viewBox is altered to perform the zoom function e.g. For a zoom of 200% on a height/width 100 svgcontent element the viewBox would be set to "0 0 50 50".

In svgcanvas.js the mousedown function gets the ctm of the svgcontent element via

		root_sctm = svgcontent.getScreenCTM().inverse();

Line 2367 in svg 2.6

The code does not then account for the effect of the viewBox transform as that transform is only applied to the children of the svgcontent element.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Prior to bug 660216 we erroneously applied the viewBox transform to the element itself rather than it's children which is why it used to work prior to that bug landing.
This is a "Tech Evangelism" bug then. Has someone reported this to 
https://code.google.com/p/svg-edit/issues/ ?
If not, could someone do that?
Assignee: nobody → english-other
Status: RESOLVED → UNCONFIRMED
Component: SVG → English Other
Ever confirmed: false
Product: Core → Tech Evangelism
Resolution: INVALID → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Keywords: regression
Summary: SVG elements are mis-positioned from the mouse cursor → "svg-edit"-editor: SVG elements are mis-positioned from the mouse cursor
This bug disappeared in v22, but has now crept up in v23 thru nightly. The same SVG-edit code does work in Chrome and IE10. I understand there are currently no active volunteers for SVG-edit. If that is the case, can someone offer up a patch for it? That would be immensely appreciated. Seems like you're almost there.
In 2.6, When drawing boxes, they are placed outside of the canvas sometimes even outside of the viewport.

But since then 2.7 has been released and it seems it is working fine
http://svg-edit.googlecode.com/svn/branches/2.7/editor/svg-editor.html
Assignee: english-other → nobody
Status: NEW → RESOLVED
Closed: 11 years ago10 years ago
Component: English Other → Desktop
Resolution: --- → FIXED
Whiteboard: [country-all] [js] [svg]
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.