rnbez / joint-js

Repository for testing the capabilities of the JavaScript diagramming library JointJS
0 stars 0 forks source link

Implement ports on symbols #1

Open rnbez opened 8 years ago

rnbez commented 8 years ago

Study the following links to learn how to implement ports:

rnbez commented 8 years ago

Looks like the library joint.shapes.devs.js has a nice implementation of ports.

rnbez commented 8 years ago

It seems that JointJs library only create ports in the svg object when the classes inPorts and/or outPorts are used. Also, it doesn't seem possible to easily change the x-y coordinates from the ports that the library creates.

Possibles solutions are:

  1. Change the part of the library that handles the ports creation.
  2. Try to implement a "stand alone" method to handle the insertion of a link (using a listener for the on-click event on ports)
rnbez commented 8 years ago

A further research showed that the process (at least for now) is easier then expected. Instead of relying on the library for the creations of ports, any element within the svg can be marked as a magnet which make them suitable for connections with Links.