Hi all,
we've been developing an application that displays complex SVG content
tot he user. We use ASV3.02 embedded in the IE6.
Such an SVG consists of many layers. Each layer may have plenty of
visible objects.
We had a requirement to implement so called Object look up.
The user clicks on SVG and we have to show all objects located at the
clicked point.
In the first approach we implemented it in the very nasty way.
We set "pointer-events" attribute for all objects to "all".
We have a MouseClickListener added to the root of the SVG. Once the
user clicks we get the target and set the "pointer-events" to "none".
Then we fire a Windows mouseclick again - the MouseClickListener
reacts on that. This time the target is different, since the last one
doesn't get a mouseclick anymore. In that way we go deeper and deeper.
At the very bottom of the SVG we have one big rectangle called
BACKGROUND. If our ObjectLookUp reaches this BACKGROUND we stop the
function and we display all found objects.
It works pretty fine until the user wants to switch to another
application during this click-loop. Because we send mouseclick, but it
won't be handled by our MouseClickListener, since svgViewer is not
visible anymore.
So would like to fix this problem.
We came to the idea to use dispatchEvent method.
So what we have is (pseudo code):
MouseClickListener{
handleEvent(evt){
if(evt.target == BACKGROUND){
showObjects(targetCollection);
exit();
}
targetCollection.add(evt.target);
evt.target.setAttribute("pointer-events", "none")
// what to do here??????
document.root.dispatchEvent(evt);
}
}
Since evt is already set and its target is set to the first object,
dispatchEvent will cause that handleEvent is called, but evt is not
updated - it is again the evt with target equal to the first object,
although the first opbject has "pointer-events" set to "none".
We have no API for CreateEvent() in ASV3.0. What can we do?
It is hopeless.
Could someone help us?
I searched the whole archive for the answer but I couldn't find a
solution.
thank you in advance
cheers
Maciek
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/