Closed
Bug 302103
Opened 19 years ago
Closed 19 years ago
implement SVG events
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: jwatt, Assigned: jwatt)
References
()
Details
(Keywords: fixed1.8)
Attachments
(4 files, 8 obsolete files)
5.65 KB,
image/svg+xml
|
Details | |
97.23 KB,
patch
|
tor
:
review+
jst
:
superreview+
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
602 bytes,
image/svg+xml
|
Details | |
75.87 KB,
application/octet-stream
|
Details |
Implementing the SVGScroll and SVGZoom events is essential for scale invariant features, such as the controls, label text and tacks in google maps for example. I think it's important we implement this for Firefox 1.5.
Assignee | ||
Comment 1•19 years ago
|
||
Here's a snapshot of what I've got so far. Hopefully it's fairly close, but event handlers don't get called for some reason.
Assignee | ||
Comment 2•19 years ago
|
||
Here's an updated snapshot. The new events are now being dispatched correctly and they're reaching the handlers. I've still got to figure out how to implement the 'onzoom' and 'onscroll' attributes though. This is tricky because the event attribute names don't match up with the names of the events (i.e. 'SVGZoom' and 'SVGScroll').
Attachment #190469 -
Attachment is obsolete: true
Assignee | ||
Comment 3•19 years ago
|
||
Attachment #190581 -
Attachment is obsolete: true
Assignee | ||
Comment 4•19 years ago
|
||
Appart from the reasons I gave in comment 0, I think it's important to fix this now because we don't want things like svgDocEl.addEventListener('load', loadHandler, false); to be what works in Firefox 1.5, but then svgDocEl.addEventListener('SVGLoad', loadHandler, false); to be what works in later releases.
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #190704 -
Attachment is obsolete: true
Assignee | ||
Comment 6•19 years ago
|
||
Links to the relevant parts of the spec are given below. Look at these points and below. http://www.w3.org/TR/SVG/script.html#InterfaceSVGEvent http://www.w3.org/TR/SVG/interact.html#LoadEvent http://www.w3.org/TR/SVG/interact.html#EnableZoomAndPanControls
Attachment #191536 -
Attachment is obsolete: true
Attachment #192076 -
Flags: review?(tor)
Assignee | ||
Comment 7•19 years ago
|
||
(In reply to comment #6) > Created an attachment (id=192076) [edit] > patch for dispatching SVGLoad, SVGScroll and SVGZoom nsDOMSVGZoomEvent::GetZoomRectScreen should be "implemented" with NS_NOTYETIMPLEMENTED and NS_ERROR_NOT_IMPLEMENTED. In nsSVGSVGElement, I'd like to see CurrentScale and CurrentTranslate use the same mechanism for recording the current translation/scale. The method you're using for scale now is clearly commented, but I don't think it saves enough to make it worthwhile. Pan/zoom will often change both scale and translate at once, which will send multiple events with the current path.
Assignee | ||
Updated•19 years ago
|
Attachment #192076 -
Attachment is obsolete: true
Attachment #192076 -
Flags: review?(tor)
Assignee | ||
Comment 9•19 years ago
|
||
This patch adds two methods to nsISVGSVGElement to allow zoom and pan controls to modify currentScale *and* currentTranslate in a way that will only dispatch one DOM event.
Assignee | ||
Updated•19 years ago
|
Attachment #192194 -
Flags: review?(tor)
Assignee | ||
Comment 10•19 years ago
|
||
Attachment #192194 -
Attachment is obsolete: true
Attachment #192314 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Attachment #192194 -
Flags: review?(tor)
Assignee | ||
Comment 11•19 years ago
|
||
Attachment #192314 -
Attachment is obsolete: true
Attachment #192385 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Attachment #192314 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Attachment #192385 -
Flags: superreview?(jst)
Attachment #192385 -
Flags: review?(tor)
Attachment #192385 -
Flags: review?
Comment 12•19 years ago
|
||
Comment on attachment 192385 [details] [diff] [review] now initialising mZooming >--- mozilla/content/svg/content/src/nsSVGSVGElement.cpp 19 Feb 2005 10:31:24 -0000 1.50 >+++ mozilla/content/svg/content/src/nsSVGSVGElement.cpp 11 Aug 2005 15:50:32 -0000 >+ NS_IMETHOD_(float) GetPreviousTranslate_x(); >+ NS_IMETHOD_(float) GetPreviousTranslate_y(); >+ float mPreviousTranslate_x; >+ float mPreviousTranslate_y; These don't really follow the mozilla naming convention. Rest looks ok, though why the w3c called the currentTranslate event "SVGScroll" is a bit of a mystery.
Attachment #192385 -
Flags: review?(tor) → review+
Updated•19 years ago
|
Flags: blocking1.8b5+
Comment 13•19 years ago
|
||
Comment on attachment 192385 [details] [diff] [review] now initialising mZooming sr=jst
Attachment #192385 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Updated•19 years ago
|
Attachment #192385 -
Flags: approval1.8b4?
Comment 14•19 years ago
|
||
you will need the zoom and pan extension installed to test this...
Comment 15•19 years ago
|
||
from a first look at this, i'd say this works perfect, but i will do more extensive testing. great job jonathan, thanks a lot.
Comment 16•19 years ago
|
||
Please land this on the trunk and after it's verified we'll evaluate for branch inclusion.
Assignee | ||
Comment 17•19 years ago
|
||
Asa, I already landed on the trunk on 2005-08-25 14:31 PST as per shaver's request. We've requested testing of the trunk nightlies via tor's blog.
Comment 18•19 years ago
|
||
If it's fixed on trunk it should be marked fixed (and get the fixed1.8 keyword when it's fixed on branch).
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 19•19 years ago
|
||
Anyone want to verify this is fixed on the trunk so we can land it on the branch?
Comment 20•19 years ago
|
||
Attached test case does not show text.
Comment 21•19 years ago
|
||
Attached test case
Assignee | ||
Comment 22•19 years ago
|
||
Comment on attachment 194275 [details] textPath test Hi Bruce. Thanks for the report, and especially for such a small testcase! Little testcases like that help a lot. Unfortunately you've attached to the wrong bug. Can you attach your testcase to https://bugzilla.mozilla.org/show_bug.cgi?id=282579 please?
Attachment #194275 -
Attachment is obsolete: true
Comment 23•19 years ago
|
||
verifying fix, one thing though, in comment #9 you say there is a method to change currentTranslate and currentScale so the changes fire only one event. what is this method, how do i use it ? beside that it works great, i would say land it ASAP.
Assignee | ||
Comment 24•19 years ago
|
||
Holger, can you select "Mark bug as VERIFIED" to properly set the bug status. Unfortunately the method you mention is only available to internal code. Your extension can't use it I'm afraid.
Comment 25•19 years ago
|
||
unfortunatly, it seems i cant change the status of a bug, sorry.
Comment 26•19 years ago
|
||
Comment on attachment 192385 [details] [diff] [review] now initialising mZooming approved. holger, I updated your account to be able to resolve bugs.
Attachment #192385 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 28•19 years ago
|
||
err, I mean branch
Comment 29•19 years ago
|
||
When zooming in repeatedly (more than 10 times), the svg rendered becomes bizarre. When zooming out, after about 6th time, memory is guzzled up, after 10th time, Browser stops responding. I would recommend having a maximum number of zoom ins and zoom outs. Johanne
Assignee | ||
Comment 30•19 years ago
|
||
Hi Johanne. :-) Oops, I just remembered I forgot to reply to your email. (I'll get to that next.) Regarding your suggestion, you're quite right. I found the same problem when messing with http://jwatt.org/svg/tests/zoom-and-pan-controls.svg I've opened bug 308734 for this issue.
Comment 31•15 years ago
|
||
Hello :) So I thought I would give a little debriefing on what I am currently implementing. As of right now I am implementing the zoomEventListener as well implementing controls and events to do native zooming and panning. I thought I would either implement a new listener for these events or use the current svg events listener. In my point of view a seperate listener would be better :) any suggestions are welcome.
Assignee | ||
Comment 32•15 years ago
|
||
Hi Hardeep. This bug was closed, fixed, about 3 years ago. Can you open a new bug report and start over there? I only pointed you to this bug since I thought you might find in useful to review the comments and patches here. Sorry if that wasn't clear.
You need to log in
before you can comment on or make changes to this bug.
Description
•