Connecting Tech Pros Worldwide Forums | Help | Site Map

SVG and Dragging Div Overlap Conflict?

vunet.us@gmail.com
Guest
 
Posts: n/a
#1: Jan 25 '07
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.


Martin Honnen
Guest
 
Posts: n/a
#2: Jan 26 '07

re: SVG and Dragging Div Overlap Conflict?


vunet.us@gmail.com wrote:
Quote:
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?


--

Martin Honnen
http://JavaScript.FAQTs.com/
vunet.us@gmail.com
Guest
 
Posts: n/a
#3: Jan 26 '07

re: SVG and Dragging Div Overlap Conflict?


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.

On Jan 26, 7:58 am, Martin Honnen <mahotr...@yahoo.dewrote:
Quote:
vunet...@gmail.com wrote:
Quote:
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?
>
--
>
Martin Honnen
http://JavaScript.FAQTs.com/
vunet.us@gmail.com
Guest
 
Posts: n/a
#4: Jan 26 '07

re: SVG and Dragging Div Overlap Conflict?


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)?

On Jan 26, 7:58 am, Martin Honnen <mahotr...@yahoo.dewrote:
Quote:
vunet...@gmail.com wrote:
Quote:
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?
>
--
>
Martin Honnen
http://JavaScript.FAQTs.com/
vunet.us@gmail.com
Guest
 
Posts: n/a
#5: Jan 26 '07

re: SVG and Dragging Div Overlap Conflict?


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.

Closed Thread