How to use the jsplumb.connect function in jsplumb

To help you get started, we’ve selected a few jsplumb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Agontuk / schema-designer / src / components / DrawRelationLine.js View on Github external
relations.forEach((relation) => {
                jsPlumb.connect({
                    source: relation.source.columnId,
                    target: relation.target.columnId,
                    overlays: [
                        ['Arrow', { location: 1, width: 12, length: 12 }]
                    ],
                    endpoints: [['Dot', { radius: 8 }], 'Blank'],
                    paintStyle: { stroke: '#7f8c8d', strokeWidth: 2 },
                    endpointStyle: { fillStyle: '#7f8c8d' }
                });
            });
        });
github GraphWalker / graphwalker-project / graphwalker-studio / src / main / webapp / scripts / tags / js / Studio.js View on Github external
self.on('mount', function () {
            self.connection = jsp.connect({source: self.sourceDomId, target: self.targetDomId});
            self.connection.setParameter('_edgeObject', self);

            var labelElement = $(self.root).find('editable').detach();
            $(self.connection.getOverlay('label').getElement()).append(labelElement);

            if (self.sourceDomId === self.targetDomId)
                setTimeout(function () {
                    jsp.revalidate(self.sourceDomId)
                }, 0);

            EdgeActions.setProps(self.id, {_jsp_connection: self.connection});

            self.trigger('updated');
        });