SVG and Dragging Div Overlap Conflict?

V

vunet.us

I have an SVG file and draggable div on one page. When I move div over
this SVG file, it looks like div loses control and detaches from the
mouse. If I do it slowly, div seems to barely follow the mouse which is
being over SVG.
I tried assigning zIndex to SVG file to be the same as other elements
on the page, but that did not help. Would anyone know why this happens?
Thank you.
 
M

Martin Honnen

I have an SVG file and draggable div on one page. When I move div over
this SVG file, it looks like div loses control and detaches from the
mouse. If I do it slowly, div seems to barely follow the mouse which is
being over SVG.

Which browser is that, do you use a browser with native SVG support or
one that needs a plugin?
How is the SVG embedded in the HTML document with the div?
 
V

vunet.us

It is FF2 or FF1.5 with SVG support. I see everything works well in
terms of SVG graphics. But this overlapping bothers me. Perhasp SVG is
treated as totally different object (foreigner) on the page for all
html (floating) elements? I am not sure where to start the explanations
here.
 
V

vunet.us

SVG is embedded using embed object because I manipulate it with JS.
SVG doc tree is like this: div -> embed - > svg.
The strange thing to me is when I drag this div containing SVG file,
and move it really fast, so my mouse goes over SVG graphics faster than
div changes position, I get the same problem as decribed in my first
post of mouse being detached from any floating div element. So
basically, everything I move over SVG looses its properties (unless I
do it very slowly).
Could this be a difference between 2 different types of documents
(window and SVG)?
 
V

vunet.us

More details:

Let's say, I have 2 floating divs: div->embed->svg (item 1) and
div->table (item 2).

Scenario 1: I drag item 2 over item 1. If I do it slowly, item 2
catches up with mouse, and my mouse is never over item 1 which
containing svg. If I do it fast, mouse turns up over svg faster than
following it item 2 and dragging does not work any more.

Scenario 2: I drag item 1 over item 2. Everything works fine untill I
move item 1 with svg so fast than my mouse appears over svg. No
dragging occurs any more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top