You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sporritt - Scopes for draggable connections have been broken for some time now. Unless there was some specific, intentional reason this stopped working, it's a very easy fix.
This block in endpoint.js is the culprit, the scope is not being passed in from params. We need to add scope: params.scope to the object for it to work again.
jpc = _newConnection({
sourceEndpoint: this,
targetEndpoint: this._jsPlumb.floatingEndpoint,
source: this.element, // for makeSource with parent option. ensure source element is represented correctly.
target: placeholderInfo.element,
anchors: [ this.anchor, this._jsPlumb.floatingEndpoint.anchor ],
paintStyle: params.connectorStyle, // this can be null. Connection will use the default.
hoverPaintStyle: params.connectorHoverStyle,
connector: params.connector, // this can also be null. Connection will use the default.
overlays: params.connectorOverlays,
type: this.connectionType,
cssClass: this.connectorClass,
hoverClass: this.connectorHoverClass,
data:beforeDrag
});
@sporritt - Scopes for draggable connections have been broken for some time now. Unless there was some specific, intentional reason this stopped working, it's a very easy fix.
Example: https://jsplumbtoolkit.com/community/demo/draggableConnectors/ should reflect scopes
blue
,yellow
, andgreen
, however they all returnjsPlumb_DefaultScope
instead.This block in endpoint.js is the culprit, the scope is not being passed in from
params
. We need to addscope: params.scope
to the object for it to work again.Here is the exact location: https://github.com/sporritt/jsPlumb/blob/master/src/endpoint.js#L593-L607
If you'd like a pull request let me know.
The text was updated successfully, but these errors were encountered: