Closed GoogleCodeExporter closed 8 years ago
thanks for the example code. i've put together this jsFiddle to help you:
http://jsfiddle.net/sporritt/zYqwQ/
in the code you sent me, you had jsPlumb.setRenderMode(jsPlumb.CANVAS). even
without the few bits and pieces I found, this would not work: canvas does not
support the dash style. you should force jsPlumb to use jsPlumb.SVG for render
mode (in IE < 9, it will automatically use VML regardless of what you ask for,
so the dashstyle will work there).
things to note about the jsfiddle:
- if you supply a paintStyle object to a jsPlumb.connect call, you need to
supply a strokeStyle and lineWidth value inside of it. 'dashstyle' on its own
actually did result in an SVG element being created, but it's "stroke" was set
to none and was therefore invisible.
- the 'connectorStyle' parameter in an Endpoint definition overrides any
'paintStyle' parameters you pass to jsPlumb.connect. so in that example, if
you uncomment connectorStyle, you will see all of your connections get that
dashed, 7px grey line.
- there are a few different examples of the dashstyle format in the jsfiddle.
for a reference on the format of this, look at the VML spec (search for
'dashstyle' in this page): http://www.w3.org/TR/NOTE-VML
hope this helps. i think it's fair to say that this stuff is not very well
documented in the jsPlumb docs! i'll make a note to improve the docs for the
next release.
Original comment by simon.po...@gmail.com
on 17 Oct 2011 at 8:06
Thanks a lot! It helps a lot!
Original comment by jel...@gmail.com
on 17 Oct 2011 at 7:07
cool. closing this out then.
Original comment by simon.po...@gmail.com
on 17 Oct 2011 at 10:24
Original issue reported on code.google.com by
jel...@gmail.com
on 17 Oct 2011 at 7:19Attachments: