Sunday, 15 April 2012

javascript - endpointStyle of the jsPlumb.connect method does not work correctly -



javascript - endpointStyle of the jsPlumb.connect method does not work correctly -

i'm using jsplumb. want assign different colors each connection , endpoints.

http://jsfiddle.net/rn3qe/ (problem: bluish connection should have bluish endpoints)

that is, connect phone call looks (for should set blue):

jsplumb.connect({ source:"task1", target:"task3", endpointstyle: { fillstyle:"blue", outlinecolor:"red", outlinewidth:2 }, paintstyle: { strokestyle:"blue", linewidth:4 } });

where task1 , task3 divs created using jquery:

var newstate = $('<div>').attr('id', id).addclass('task')

and defined possible sources/targets connections:

// makes task div possible target (i.e. connection can dragged to) jsplumb.maketarget(newstate, { anchor: 'continuous' }); // makes task div possible source (i.e. connection can dragged from) jsplumb.makesource(newstate, { anchor: 'continuous' });

the syntax endpointstyle: in .connect() obtained here

why paintstyle: works correctly (colors connection blue) in .connect() call, endpointstype: not (the endpoints not blue)?

javascript jsplumb

No comments:

Post a Comment