Closed GoogleCodeExporter closed 8 years ago
take a look in the documentation at the 'Paint Styles' section, specifically
the subsection 'Paint Style Parameters'.
the 'dash style' attribute goes where you were thinking, but you just need to
read the VML spec to find the appropriate syntax for it. i might beef up the
jsplumb documentation to include a few examples at some stage.
jsplumb docs:
http://jsplumb.org/doc/usage.html
vml spec:
http://www.w3.org/TR/NOTE-VML
here's an excerpt of their docs:
The dashstyle attribute allows the user to specify a custom defined dash
pattern. This is done using a series of numbers. Dash styles are defined in
terms of the length of the dash (the drawn part of the stroke) and the length
of the space between the dashes. The lengths are relative to the line width -
a length of "1" is equal to the line width. The endcap style is applied to
each dash, the arrow style is not. The string first defines the length of the
dash then the length of the space. This may be repeated to form complex dash
styles. The string should always contain a pair of numbers. If it contains
an odd number of numbers the last should be disregarded. The following table
lists some typical values and a description of the intended effect. "0"
implies a dot which should be four-fold symmetrical (with round end caps it
should be a circle). If the line end cap is flat a viewer should choose a
built-in operating system dash where possible (i.e. something which is fast to
draw).
dashstyle Example Description
"2 2" short-dashes (each dash and the space in between is twice the width of
the line)
"0 2" dots (space between is twice the width of the line)
"2 2 0 2" short-dash dot
"2 2 0 2 0 2" short-dash dot dot
"1 2" dot (each dash is the width of the line while each space is twice the
width of the line)
"4 2" dash (each dash is four time the width of the line while each space is
twice the width of the line)
"8 2" long-dash
"4 2 1 2" dash dot
"8 2 1 2" long-dash dot
"8 2 1 2 1 2" long-dash dot dot
Original comment by simon.po...@gmail.com
on 21 Sep 2011 at 1:03
that what i done :
paintStyle:{ strokeStyle:"blue", lineWidth:10, dashstyle:"2 2" },
and it doesnt works (same as without dashstyle)
may be i miss something
thanks for your answer
Original comment by pascal.l...@univ-orleans.fr
on 21 Sep 2011 at 1:57
i dont suppose you could recreate this in jsfiddle, could you? without seeing
the code i can only make guesses.
Original comment by simon.po...@gmail.com
on 22 Sep 2011 at 8:12
sorry but my english is not so good, i think you need code then i made a
pastebin : http://pastebin.com/6Vd4URDw
thanks again for your answer
Original comment by pascal.l...@univ-orleans.fr
on 22 Sep 2011 at 8:44
I made an other test with svg because i saw that firefox doenst support vml
http://pastebin.com/Ry6bPYEJ
same i cant make it works
thanks again for your help
Original comment by pascal.l...@univ-orleans.fr
on 22 Sep 2011 at 1:47
I forgot to tell you that i'm using firefox 3.5.16 (iceweasel)
Original comment by pascal.l...@univ-orleans.fr
on 22 Sep 2011 at 3:11
arghhhhhhhhhhhhhhhh
it works with firefox 6
thanks again !!
Original comment by pascal.l...@univ-orleans.fr
on 22 Sep 2011 at 3:16
so is this all working for you now? i will close the defect if so.
Original comment by simon.po...@gmail.com
on 7 Oct 2011 at 10:46
this might be useful - just put it together for someone else who was having
trouble with dashed styles:
http://jsfiddle.net/sporritt/zYqwQ/
..closing this out.
Original comment by simon.po...@gmail.com
on 17 Oct 2011 at 8:42
Original issue reported on code.google.com by
pascal.l...@univ-orleans.fr
on 21 Sep 2011 at 7:20