Hello,

I'm trying to set the color of edges that are added using the drag an drop feature. Please see "javascript/examples/toolbar.html" in case of doubt.

What I would like to do is to define the color style for those new created edges. But if I use style[mxConstants.STYLE_STROKECOLOR] = 'red', for example, only the geometric elements become red, the edge still black.

Then, when I create new edges using the drag and drop feature, the edges are blue!

Do I miss reading a STYLE_* or something?

Thanks,

Phillip.

asked 05 Oct '12, 08:05

PhillipSpring's gravatar image

PhillipSpring
26116
accept rate: 33%


Hello!

I found the solution looking at "javascript/examples/swimlanes.html".

I was trying to do was to change the style of: style = graph.getStylesheet().getDefaultVertexStyle();

While I should do is to change the style of: style = graph.getStylesheet().getDefaultEdgeStyle();

I hope this is useful for whom is having the same difficulties!

Cheers,

Phillip.

link

answered 05 Oct '12, 08:31

PhillipSpring's gravatar image

PhillipSpring
26116
accept rate: 33%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×100
×50
×11

Asked: 05 Oct '12, 08:05

Seen: 1,782 times

Last updated: 05 Oct '12, 08:31