The easiest way I've found to move the objects in a group is to SVG_SET_TRANSFORM_TRANSLATE the group when the mouse is moving. Later if you UNGROUP, the translation needs to be spread out over the group's children so they don't jump to new locations.
You can use SVG_Get_root_reference in a loop to find the topmost group of the clicked object (the last one whose TYPE is not "svg"). Unless an ID needs to be meaningful, I've been letting the 4D SVG Engine set the ID (SVG_SET_OPTIONS), or setting the ID to GENERATE UUID. Keith - CDI > On Jun 5, 2018, at 3:22 PM, John J Foster via 4D_Tech <[email protected]> > wrote: > > Hi All, > > {I sent this yesterday & and again earlier today and it never made it > through?} > > I am trying to create an interface built using SVG. The svg image will > include many different kinds of complex objects. Bu complex I mean that each > object is itself a complex object built by SVG and added into the main SVG > image. > > I want to be able to identify any part of an image I click on even if it’s > part of a group. But I also want to be able to move the object around to > different coords in the image. > > I am using SVG_SET_ID (domSvg;”id_name...”) set each part of the objects ID. > when I click on them I see the ID and this works great. BUT... > > But when I move an object I want the entire object to move not just the part > of it. > > So wondering if anyone has decided on a strategy for managing SVG OD’s and > how to best handle moving things around? > > If this doesn’t make sense please ask questions. > > BTW I am running in 4D v16 r6 and will be moving to v17. > > Appreciate, > John… ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

