Hareeshchandera / jsplumb

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

reinstate jsPlumb.Defaults.Container and the 'container' option on jsPlumb.connect and jsPlumb.addEndpoint. #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
in all versions prior to 1.3.0, you could tell jsPlumb which element to attach 
created elements to, either using the Defaults mechanism, or on a per-call 
basis.

people want this back.  so it will be coming back. in 1.3.2.

Original issue reported on code.google.com by simon.po...@gmail.com on 28 Jul 2011 at 6:54

GoogleCodeExporter commented 8 years ago
this has now been done.

you can set a container on jsplumb's defaults, for example:

jsPlumb.Defaults.Container = $("body");

or

jsPlumb.Defaults.Container = "someElementId";

..and you can also supply a 'container' to addEndpoint and connect:

jsPlumb.addEndpoint(someDiv, { container:$("body") });

jsPlumb.connect({source:someDiv, target:someOtherDiv, 
container:"anotherDivId"});

this is in the 1.3.2 dev scripts now and will be released in 1.3.2, within a 
week or so.

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

GoogleCodeExporter commented 8 years ago
What will be the default behavior? As per jsPlumb < 1.3.0 (attach to the body), 
or as per jsPlumb 1.3.0 (attach to the parent of the element).
I like the current behavior, but am not opposed to reinstatement of the 
container property, as long as no incompatibilities are introduced (if 
possible). 

Original comment by eel...@xs4all.nl on 6 Aug 2011 at 8:25

GoogleCodeExporter commented 8 years ago
default is as per 1.3.0 - attach to the parent of the element.  

Original comment by simon.po...@gmail.com on 6 Aug 2011 at 8:41

GoogleCodeExporter commented 8 years ago

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