473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

SVG and Dragging Div Overlap Conflict?

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.

Jan 25 '07 #1
4 2835
vu******@gmail.com wrote:
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/
Jan 26 '07 #2
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:
vunet...@gmail.com wrote:
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/
Jan 26 '07 #3
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:
vunet...@gmail.com wrote:
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/
Jan 26 '07 #4
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.

Jan 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sin Jeong-hun | last post by:
If FlowLayoutPanel's AutoScroll is set to true, there appears a scroll bar on the right. Normally, users would expect the contents is scrolled while they are dragging the scroll bar. Well, it does,...
2
by: Christian Blackburn | last post by:
Hi Gang, I would like to be able to drag and drop documents onto my application and have them open immediately thereafter. Can somebody point me towards a KB article or example? I could find a...
16
by: Geoff Jones | last post by:
Hiya Could anybody direct me to some examples of code to do the following: Display a bitmap on a form which can then be moved about i.e. dragged, using the left down button of the mouse. ...
3
by: Liz | last post by:
I need to implement dragging a borderless form by clicking/dragging on the form surface. Using the "standard" approach (setting "CanMove" flag on MouseDown, moving the form by the delta of the...
2
by: Tull Clancey | last post by:
Does anyone have, or can anyone suggest a URL for code to drag a control around a form at run time? VB.Net 2003. I have written stuff in VB6 to do this before, but a long time ago and I don't...
13
by: Mike S | last post by:
I came across the following paragraph in the "Semantics" section for simple assignment in N1124 (C99 draft) and I'm wondering if I'm interpreting it right: 6.5.16.1p3: If the value being...
7
by: Cruelemort | last post by:
All, I have a div in my page that has a set width of 1000px, height of 200px, inside this i declare two more div's, both relatively positioned and floated left, the first is placed to the top...
14
lotus18
by: lotus18 | last post by:
Hello all I have these records on my Day Table for my complete database table please click here 1. M 2. T 3. W 4. TH 5. F 6. S
5
by: liketofindoutwhy | last post by:
It seems like there are only 4 methods to overlap 2 images using CSS? There are two images, each with its own URL. Using CSS, there seems to be 2 ways to overlap them (the task is actually to put...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.