Connector line dashes/line

I am using a connector with dashed lines. Can the dashes be replaced with say other objects or images? Kind of like the pen with different shapes?

Not really... the dashes are from CreateJS. You can adjust the spacing and length of dashes with parameters. So you can sort of make dots. And you can adjust the thickness. But nothing like Beads or Pen for instance.

It seems that the "num" and "duplicateLines" parameters aren't working?

I am able to drag the node after setting num to 1 and it gives an error.

Okay. We did a fair bit of work with Connectors for ZIM version ZIM 02 so possibly it affected some other options... there are quite a few combinations available. This works for us for the num parameter - did you do something different?

const connectors = new Connectors({num:1}).center();

And the duplicateLines parameter is duplicateLine. So we have fixed the typo in the docs. Thanks!

Yes, i have that on the example. It does limit the lines however as you drag the line you can also drag the node at the same time. I wan to prevent that. The nodes lock once you connect them but before.

const connectors = new Connectors({num:1, rootLock:true}).center();

looking at it now, after a few years, that is an unexpected parameter name. move might have been better.

I have used that and it locks fine after they connect but not while dragging the first node. As you drag the line from node1 you can go back and drag node1 at the same time.

After I let go of them I get this error.

Uncaught TypeError: Cannot read properties of undefined (reading 'before')
Line: -16

I do not get that with a simple test.

Are you in the editor? Anyway, will need to see more code. Or you can try simplifying by removing some parameters or event functions and see if you can figure out what is causing the error.

OK, I don't get the error with your sample code above but I am able to drag the node while dragging the line out of it.

This is my code: ZIM Editor - JavaScript Canvas Online Code Editor and Viewer

I am not getting an error. What are you doing when you see one?

I am dragging the line from one node to connect to the other node and while I am dragging the line, I drag the node where the line originates from. When I let go of both touches i get the error.

Okay... it looks like rootLock is not working right in multitouch... we will have a look.

This has been patched in ZIM 016 - please do a refresh and let us know how it goes.

You are the man! Thank you sir! ZIM is simply amazing!

new issue. The nodes lock as intended but if it doesn't connect you can't drag it anymore, it remains locked.

Ok, the solution to this problem is setting num:2. It would be nice if we didn't have to create that second line.

OK, spoke to soon. If you drag the two lines from the node at the same time and drop them not on the target node you can't drag a line but if you do it one at a time and miss you can keep dragging lines until you get it. Once the first one locks, you have an extra line that you can use and when you get it "wrong" it disappears. Make sense? This will happen on my example above.

When we tested ours, you were able to drag another line after missing one. Can you see if it is any different?