How to use the jsplumb.registerConnectionType 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 GraphWalker / graphwalker-project / graphwalker-studio / src / main / webapp / scripts / tags / js / Studio.js View on Github external
foldback: 0.1
                        }],
                        ['Label', {
                            id: 'label', cssClass: 'edge-label', events: {
                                click: function (label) {
                                    $(label.getElement()).find('editable').click();
                                }
                            }
                        }]
                    ]
                });

                jsp.registerConnectionType('selected', {
                    paintStyle: {strokeStyle: '#3db2e3', lineWidth: 2}
                });
                jsp.registerConnectionType('verified', {
                    paintStyle: {strokeStyle: '#325262', lineWidth: 1, dashstyle: "0 0"}
                });
                jsp.registerConnectionType('error', {
                    paintStyle: {strokeStyle: '#ffc880', lineWidth: 1, dashstyle: "0 0"}
                });

                jsp.setContainer('canvas-body');

                jsp.bind('beforeDrop', function (params) {
                    self.addEdge(params.sourceId, params.targetId);
                    return false;
                });

                jsp.bind('click', function (connection, evt) {
                    var edge = connection.getParameter('_edgeObject');
                    self.opts.selection.update(edge, evt.metaKey);
github GraphWalker / graphwalker-project / graphwalker-studio / src / main / webapp / scripts / tags / js / Studio.js View on Github external
location: 1,
                            id: 'arrow',
                            length: 12,
                            foldback: 0.1
                        }],
                        ['Label', {
                            id: 'label', cssClass: 'edge-label', events: {
                                click: function (label) {
                                    $(label.getElement()).find('editable').click();
                                }
                            }
                        }]
                    ]
                });

                jsp.registerConnectionType('selected', {
                    paintStyle: {strokeStyle: '#3db2e3', lineWidth: 2}
                });
                jsp.registerConnectionType('verified', {
                    paintStyle: {strokeStyle: '#325262', lineWidth: 1, dashstyle: "0 0"}
                });
                jsp.registerConnectionType('error', {
                    paintStyle: {strokeStyle: '#ffc880', lineWidth: 1, dashstyle: "0 0"}
                });

                jsp.setContainer('canvas-body');

                jsp.bind('beforeDrop', function (params) {
                    self.addEdge(params.sourceId, params.targetId);
                    return false;
                });
github GraphWalker / graphwalker-project / graphwalker-studio / src / main / webapp / scripts / tags / js / Studio.js View on Github external
id: 'label', cssClass: 'edge-label', events: {
                                click: function (label) {
                                    $(label.getElement()).find('editable').click();
                                }
                            }
                        }]
                    ]
                });

                jsp.registerConnectionType('selected', {
                    paintStyle: {strokeStyle: '#3db2e3', lineWidth: 2}
                });
                jsp.registerConnectionType('verified', {
                    paintStyle: {strokeStyle: '#325262', lineWidth: 1, dashstyle: "0 0"}
                });
                jsp.registerConnectionType('error', {
                    paintStyle: {strokeStyle: '#ffc880', lineWidth: 1, dashstyle: "0 0"}
                });

                jsp.setContainer('canvas-body');

                jsp.bind('beforeDrop', function (params) {
                    self.addEdge(params.sourceId, params.targetId);
                    return false;
                });

                jsp.bind('click', function (connection, evt) {
                    var edge = connection.getParameter('_edgeObject');
                    self.opts.selection.update(edge, evt.metaKey);
                });
            });