react-design-editor 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -314,7 +314,7 @@ class EventHandler {
|
|
|
314
314
|
if (editable) {
|
|
315
315
|
if (this.handler.prevTarget && this.handler.prevTarget.superType === 'link') {
|
|
316
316
|
this.handler.prevTarget.set({
|
|
317
|
-
stroke: this.handler.prevTarget.originStroke,
|
|
317
|
+
stroke: this.handler.prevTarget.originStroke || this.handler.prevTarget.stroke,
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
if (target && target.type === 'fromPort') {
|
|
@@ -339,7 +339,7 @@ class EventHandler {
|
|
|
339
339
|
if (this.handler.interactionMode === 'selection') {
|
|
340
340
|
if (target && target.superType === 'link') {
|
|
341
341
|
target.set({
|
|
342
|
-
stroke: target.
|
|
342
|
+
stroke: target.selectedStroke || 'green',
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
345
|
this.handler.prevTarget = target;
|
package/lib/objects/Link.js
CHANGED
|
@@ -9,8 +9,7 @@ const Link = fabric_1.fabric.util.createClass(fabric_1.fabric.Line, {
|
|
|
9
9
|
initialize(fromNode, fromPort, toNode, toPort, options) {
|
|
10
10
|
options = options || {};
|
|
11
11
|
const coords = [fromPort.left, fromPort.top, toPort.left, toPort.top];
|
|
12
|
-
|
|
13
|
-
this.set({
|
|
12
|
+
Object.assign(options, {
|
|
14
13
|
strokeWidth: 4,
|
|
15
14
|
id: options.id || uuidv4_1.uuid(),
|
|
16
15
|
originX: 'center',
|
|
@@ -29,7 +28,9 @@ const Link = fabric_1.fabric.util.createClass(fabric_1.fabric.Line, {
|
|
|
29
28
|
fromPort,
|
|
30
29
|
toNode,
|
|
31
30
|
toPort,
|
|
31
|
+
hoverCursor: 'pointer',
|
|
32
32
|
});
|
|
33
|
+
this.callSuper('initialize', coords, options);
|
|
33
34
|
},
|
|
34
35
|
setPort(fromNode, fromPort, _toNode, toPort) {
|
|
35
36
|
if (fromNode.type === 'BroadcastNode') {
|