W3C home > Mailing lists > Public > www-svg@w3.org > July 2012

SVG Element Drag/Drop Issue on Zoomed in SVG

From: Vishal Aegis <vishal@aegisisc.com>
Date: Tue, 24 Jul 2012 07:40:27 -0700 (PDT)
Message-ID: <34205691.post@talk.nabble.com>
To: www-svg@w3.org
Dear Friends, 

i'm stuck with the below mentioned scenario, 

Following Implementations are done,

1) i'm loading svg in html division as shown below,

	$('#SvgDIV').svg({ loadURL: 'map.svg', onLoad: function () {
		// here i'm binding some functionalities with jquery
    }
});

here map.svg is representing a map

2) [Drag and Drop From HTML DIV To SVG] 

I have another html division i.e. <div id="pqr" class="drag"> <ul><li
class="abc" image="xyz.svg">XYZ</li></ul> </div>

here xyz.svg represents an element,And i'm placing/appending this element as
an svg image tag on above map (i.e. mentioned in point-1),
To accomplish that I'm dragging this <li> to above loaded svg map in
"SvgDIV" division with the help of jQuery UI plugin.

As a result,xyz.svg(element) that is binded with <li class="abc"> will be
appended as an svg image tag in map.svg (map) on the drop event of <li>


3) [Drag and Drop From SVG To SVG] 

Drag & Drop of svg element(xyz.svg) in map.svg(map) with the help of jQuery
UI plugin only.


4) SVG Zoom in out functionality without panning by playing with Viewbox 
coordinates of root element of map SVG i.e. map.svg, 

Implemented Point 3 & 4 are Drag and Drop without zooming in/out the
map,that means map is in its original size and position 
when we are making Drag/Drop From SVG To SVG and From HTML DIV to SVG,
the issue is with drag and drop of an element along with zoom in/out of the
map 

Issue 1 : Is it possible/feasible If I want to drag & drop element(xyz.svg)
on map(map.svg) at the time of ZOOM IN IS APPLIED ON THE MAP? 
and if it is correct approach/possible then how to get correct
position/actual coordinates of element 
in map on drop event of that svg element? (Please suggest any possible way
to achieve this) 

Issue 2 : When i try to drag element from map and drop it to the map only
that time also getting problem to get actual position/coordinates of element
on map

Please suggest the possible ways to get rid of it. 

Regards, 
Vishal
-- 
View this message in context: http://old.nabble.com/SVG-Element-Drag-Drop-Issue-on-Zoomed-in-SVG-tp34205691p34205691.html
Sent from the w3.org - www-svg mailing list archive at Nabble.com.
Received on Wednesday, 25 July 2012 09:54:00 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:51 GMT