One of our project requirements is to have a basic online schematic editor for electrical circuits. Therefore, it was my task this week to explore JointJS as the library that we will be using in order to build our editor. However, it needs to be built from inside a Witty project!
JJSdiv->id() is used to return the id of the HTML
Now let me discuss the library itself, as a schematic editor for electrical circuits. JointJS is a very powerful library. It has Elements objects (which can represent the electrical components) and Links objects (that can represent the wires). It allows you to define all aspects of how an element or a link looks, define ports for the elements for connections and specify which ports can connect to which (e.g, output ports to connect only to input ports). It also provides a functionality for auto routing when connecting Links (wires) to avoid obstacles or other elements.
That’s it for JointJS, which I’ve been working on for the second half of this week. The first half was dedicated for Witty Wresources and HTTP requests and responses and how to deal with the non-gui part of Wt.