How to use the jsplumb.jsPlumb.fire 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 apache / incubator-dolphinscheduler / escheduler-ui / src / js / conf / home / pages / dag / _source / plugIn / jsPlumbHandle.js View on Github external
targetId = `${targetId[0]}-${targetId[1]}-${targetId[2]}`
      } else {
        sourceId = v.endPointSourceId
        targetId = v.endPointTargetId
      }

      this.JspInstance.connect({
        source: sourceId,
        target: targetId,
        type: 'basic',
        paintStyle: { strokeWidth: 2, stroke: '#555' }
      })
    })
  })

  jsPlumb.fire('jsPlumbDemoLoaded', this.JspInstance)

  // Connection monitoring
  this.handleEvent()

  // Drag and drop new nodes
  this.draggable()
}
github apache / incubator-dolphinscheduler / dolphinscheduler-ui / src / js / conf / home / pages / dag / _source / plugIn / jsPlumbHandle.js View on Github external
targetId = `${targetId[0]}-${targetId[1]}-${targetId[2]}`
      } else {
        sourceId = v.endPointSourceId
        targetId = v.endPointTargetId
      }

      this.JspInstance.connect({
        source: sourceId,
        target: targetId,
        type: 'basic',
        paintStyle: { strokeWidth: 2, stroke: '#555' }
      })
    })
  })

  jsPlumb.fire('jsPlumbDemoLoaded', this.JspInstance)

  // Connection monitoring
  this.handleEvent()

  // Drag and drop new nodes
  this.draggable()
}
github toutouping / vue-web-demo / src / views / flow-template / utils / flow.js View on Github external
length: 6,
            events: { // 终线箭头的点击事件
              click: function (e) {
                e.stopPropagation();
              }
            }
          }],
          ['Label',
                        {label: '<i class="common-icon-dark-circle-close"></i>', id: 'label'}
          ]
        ],
        Container: 'ktj-canvas' // 容器id
      });

      // 完成初始化
      jsPlumb.fire('jsPlumbDemoLoaded', instance);

      // flow插件初始化
      var init = function () {
        jsPlumb.setContainer(opts.canvas);

        // 将所有节点包裹在内置的DIV
        $nodeContainer.el = $(opts.canvas).find('.bk-flow-container');
        // 加入基础样式class
        $nodeContainer.el.css('position', 'relative');
        _self.addClass('bk-flow-wrap');
        $(opts.canvas).addClass('bk-flow-canvas');

        // _initDragging();
        // _initEvent();
      };
github tao12345666333 / vue-jsPlumb / src / views / Index.vue View on Github external
overlays,
          });
        }

        // init location
        for (const i of flowData.location) {
          $(`.${i[0]}`).css('left', i[1] * 20);
          $(`.${i[0]}`).css('top', i[2] * 20);
        }

        for (const point of flowData.point) {
          instance.draggable(`${point._id}`);
        }
      });

      jsPlumb.fire('jsPlumbDemoLoaded', instance);
    },
  },