Hareeshchandera / jsplumb

Automatically exported from code.google.com/p/jsplumb
0 stars 0 forks source link

Add class to svg container div #112

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would you consider adding a css class to the SVG container divs? My use case is 
that I am displaying connections on moveenter and hiding them on mouseleave, 
and the element triggering this has the connection drawn over it. As a result I 
need to change the z-order so that the connection is instead drawn under it and 
doesn't trigger a mouseleave. With canvas this works because every element has 
a class I can style, but in svg the container div has none. I've attached a 
patch as an example solution.

Original issue reported on code.google.com by q3a...@gmail.com on 26 Jul 2011 at 8:40

Attachments:

GoogleCodeExporter commented 8 years ago
yes, absolutely.  thanks for the patch.  i'll take a look.

Original comment by simon.po...@gmail.com on 26 Jul 2011 at 10:54

GoogleCodeExporter commented 8 years ago
hi...i just looked at your patch.  rather than introduce a new class, what i 
think i'm going to try to do is actually get the '_jsPlumb_connector' or 
'_jsPlumb_endpoint' classes on the SVG, which will make SVG work in the same 
way as the Canvas renderer.

Original comment by simon.po...@gmail.com on 5 Aug 2011 at 7:33

GoogleCodeExporter commented 8 years ago
ok so that class was _already_ on the svg ;)  what i meant was i want to put it 
on the containing div. so that's what I have done.  this means that all three 
renderers - Canvas, SVG and VML - have the jsplumb classes on their top level 
elements, which should help keep the behaviour consistent across browsers.

this is in the 1.3.2 dev scripts, and will be released in 1.3.2 within the week.

Original comment by simon.po...@gmail.com on 5 Aug 2011 at 8:01

GoogleCodeExporter commented 8 years ago

Original comment by simon.po...@gmail.com on 11 Aug 2011 at 3:44