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.selectFill || 'green',
342
+ stroke: target.selectedStroke || 'green',
343
343
  });
344
344
  }
345
345
  this.handler.prevTarget = target;
@@ -250,7 +250,7 @@ class NodeHandler {
250
250
  object.animating = false;
251
251
  if (object.superType === 'link') {
252
252
  object.set({
253
- stroke: object.originStroke,
253
+ stroke: object.originStroke || object.stroke,
254
254
  });
255
255
  }
256
256
  },
@@ -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
- this.callSuper('initialize', coords, options);
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') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-design-editor",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "description": "Design Editor Tools with React.js + ant.design + fabric.js",
5
5
  "main": "dist/react-design-editor.min.js",
6
6
  "typings": "lib/index.d.ts",