Any examples on usage of the Geometry API to create a single Shape / model with multiple paths? #2671
-
IntroductionHi, I would like to create a shape / stencil with ports that uses the Geometry API defined here: https://resources.jointjs.com/docs/jointjs/v4.0/geometry.html. As an example, I would like to create a single shape that contains two paths. with ports defined at the input and output of those paths. Could anyone provide assistance on roughly how this could be achieved? For a simple example, maybe two lines with input ports on the left and output ports on the right but as a single shape / model? Thanks! Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You don't need the Geometry library for that. You need a basic knowledge of SVG. Here's our tutorial on custom elements. |
Beta Was this translation helpful? Give feedback.
-
@kumilingus one question relating to Svelte + JointJS. How do you recommend defining these custom SVG shapes if I want to define these things in a separate file from |
Beta Was this translation helpful? Give feedback.
You don't need the Geometry library for that. You need a basic knowledge of SVG.
Here's our tutorial on custom elements.
Here are a few examples of custom shapes: JSFiddle