@visactor/vrender-core 1.0.29 → 1.0.30-alpha.1

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.
Files changed (58) hide show
  1. package/cjs/common/diff.js +2 -1
  2. package/cjs/common/event-transformer.js +1 -2
  3. package/cjs/common/render-area.js +1 -1
  4. package/cjs/common/render-command-list.js +1 -1
  5. package/cjs/common/render-curve.js +1 -1
  6. package/cjs/common/render-utils.js +1 -1
  7. package/cjs/common/seg-context.js +1 -1
  8. package/cjs/common/simplify.js +2 -1
  9. package/cjs/common/sort.js +1 -1
  10. package/cjs/common/split-path.js +1 -1
  11. package/cjs/common/store.js +1 -1
  12. package/cjs/common/text.js +1 -1
  13. package/cjs/common/utils.js +1 -1
  14. package/cjs/core/constants.js +1 -1
  15. package/cjs/core/core-modules.js +1 -1
  16. package/cjs/core/global-module.js +0 -2
  17. package/cjs/core/global.js +1 -1
  18. package/cjs/core/graphic-utils.js +1 -1
  19. package/cjs/core/index.js +1 -1
  20. package/cjs/core/layer-service.js +1 -2
  21. package/cjs/core/layer.js +1 -1
  22. package/cjs/core/light.js +1 -1
  23. package/cjs/core/stage.js +1 -1
  24. package/cjs/core/window.js +1 -1
  25. package/cjs/graphic/graphic.js +2 -2
  26. package/cjs/graphic/graphic.js.map +1 -1
  27. package/cjs/plugins/builtin-plugin/edit-module.js +5 -2
  28. package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
  29. package/dist/index.es.js +9 -3
  30. package/es/common/diff.js +2 -1
  31. package/es/common/event-transformer.js +1 -2
  32. package/es/common/render-area.js +1 -1
  33. package/es/common/render-command-list.js +1 -1
  34. package/es/common/render-curve.js +1 -1
  35. package/es/common/render-utils.js +1 -1
  36. package/es/common/seg-context.js +1 -1
  37. package/es/common/simplify.js +2 -1
  38. package/es/common/sort.js +1 -1
  39. package/es/common/split-path.js +1 -1
  40. package/es/common/store.js +1 -1
  41. package/es/common/text.js +1 -1
  42. package/es/common/utils.js +1 -1
  43. package/es/core/constants.js +1 -1
  44. package/es/core/core-modules.js +1 -1
  45. package/es/core/global-module.js +0 -2
  46. package/es/core/global.js +1 -1
  47. package/es/core/graphic-utils.js +1 -1
  48. package/es/core/index.js +1 -1
  49. package/es/core/layer-service.js +1 -2
  50. package/es/core/layer.js +1 -1
  51. package/es/core/light.js +1 -1
  52. package/es/core/stage.js +1 -1
  53. package/es/core/window.js +1 -1
  54. package/es/graphic/graphic.js +2 -2
  55. package/es/graphic/graphic.js.map +1 -1
  56. package/es/plugins/builtin-plugin/edit-module.js +4 -2
  57. package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
  58. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -11678,6 +11678,9 @@ class Graphic extends Node {
11678
11678
  }
11679
11679
  ]);
11680
11680
  noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, false, { type: AttributeUpdateType.STATE });
11681
+ if (this.finalAttribute) {
11682
+ Object.assign(this.finalAttribute, attrs);
11683
+ }
11681
11684
  }
11682
11685
  else {
11683
11686
  this.stopStateAnimates();
@@ -11724,7 +11727,7 @@ class Graphic extends Node {
11724
11727
  getNormalAttribute(key) {
11725
11728
  var _a, _b;
11726
11729
  const value = this.attribute[key];
11727
- if (this.animates) {
11730
+ if (this.animates && this.animates.size) {
11728
11731
  return (_a = this.finalAttribute) === null || _a === void 0 ? void 0 : _a[key];
11729
11732
  }
11730
11733
  return value !== null && value !== void 0 ? value : (_b = this.finalAttribute) === null || _b === void 0 ? void 0 : _b[key];
@@ -25069,12 +25072,15 @@ class EditModule {
25069
25072
  this.selectionStartCursorIdx = selectionStartCursorIdx;
25070
25073
  }
25071
25074
  release() {
25075
+ var _a;
25072
25076
  this.textAreaDom.removeEventListener('input', this.handleInput);
25073
25077
  this.textAreaDom.removeEventListener('compositionstart', this.handleCompositionStart);
25074
25078
  this.textAreaDom.removeEventListener('compositionend', this.handleCompositionEnd);
25075
- this.textAreaDom.addEventListener('focusin', this.handleFocusOut);
25076
- this.textAreaDom.addEventListener('focusout', this.handleFocusOut);
25079
+ this.textAreaDom.removeEventListener('focusin', this.handleFocusOut);
25080
+ this.textAreaDom.removeEventListener('focusout', this.handleFocusOut);
25077
25081
  application.global.removeEventListener('keydown', this.handleKeyDown);
25082
+ (_a = this.textAreaDom.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this.textAreaDom);
25083
+ this.textAreaDom = null;
25078
25084
  }
25079
25085
  }
25080
25086
 
package/es/common/diff.js CHANGED
@@ -8,4 +8,5 @@ export function diff(oldAttrs, newAttrs, getAttr) {
8
8
  void 0 !== value && (diffObj[key] = value);
9
9
  }
10
10
  return diffObj;
11
- }
11
+ }
12
+ //# sourceMappingURL=diff.js.map
@@ -77,5 +77,4 @@ export function mapToCanvasPointForCanvas(nativeEvent) {
77
77
  x: nativeEvent._canvasX || 0,
78
78
  y: nativeEvent._canvasY || 0
79
79
  };
80
- }
81
- //# sourceMappingURL=event-transformer.js.map
80
+ }
@@ -61,4 +61,4 @@ function drawAreaBlock(path, topList, bottomList, params) {
61
61
  }
62
62
  path.closePath();
63
63
  }
64
- //# sourceMappingURL=render-area.js.map
64
+ //# sourceMappingURL=render-area.js.map
@@ -6,4 +6,4 @@ export function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy
6
6
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
7
7
  }
8
8
  }
9
- //# sourceMappingURL=render-command-list.js.map
9
+ //# sourceMappingURL=render-command-list.js.map
@@ -93,4 +93,4 @@ export function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
93
93
  path.closePath();
94
94
  }));
95
95
  }
96
- //# sourceMappingURL=render-curve.js.map
96
+ //# sourceMappingURL=render-curve.js.map
@@ -11,4 +11,4 @@ export function drawSegItem(ctx, curve, endPercent, params) {
11
11
  ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
12
12
  }
13
13
  }
14
- //# sourceMappingURL=render-utils.js.map
14
+ //# sourceMappingURL=render-utils.js.map
@@ -91,4 +91,4 @@ export class ReflectSegContext extends SegContext {
91
91
  return super.clear();
92
92
  }
93
93
  }
94
- //# sourceMappingURL=seg-context.js.map
94
+ //# sourceMappingURL=seg-context.js.map
@@ -29,4 +29,5 @@ function simplifyDouglasPeucker(points, sqTolerance) {
29
29
  export function flatten_simplify(points, tolerance, highestQuality) {
30
30
  if (points.length <= 10) return points;
31
31
  return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
32
- }
32
+ }
33
+ //# sourceMappingURL=simplify.js.map
package/es/common/sort.js CHANGED
@@ -94,4 +94,4 @@ export function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
94
94
  !1)), reverse);
95
95
  return result;
96
96
  }
97
- //# sourceMappingURL=sort.js.map
97
+ //# sourceMappingURL=sort.js.map
@@ -248,4 +248,4 @@ export const splitPath = (path, count) => {
248
248
  }
249
249
  return res;
250
250
  };
251
- //# sourceMappingURL=split-path.js.map
251
+ //# sourceMappingURL=split-path.js.map
@@ -1,2 +1,2 @@
1
1
  class StageStore {}
2
- //# sourceMappingURL=store.js.map
2
+ //# sourceMappingURL=store.js.map
package/es/common/text.js CHANGED
@@ -24,4 +24,4 @@ export function textAttributesToStyle(attrs) {
24
24
  attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"),
25
25
  attrs.fill && isString(attrs.fill) && (style.color = attrs.fill), style;
26
26
  }
27
- //# sourceMappingURL=text.js.map
27
+ //# sourceMappingURL=text.js.map
@@ -148,4 +148,4 @@ export const calculateLineHeight = (lineHeight, fontSize) => {
148
148
  const _lh = _calculateLineHeight(lineHeight, fontSize);
149
149
  return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
150
150
  };
151
- //# sourceMappingURL=utils.js.map
151
+ //# sourceMappingURL=utils.js.map
@@ -9,4 +9,4 @@ export const StaticLayerHandlerContribution = Symbol.for("StaticLayerHandlerCont
9
9
  export const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
10
10
 
11
11
  export const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
12
- //# sourceMappingURL=constants.js.map
12
+ //# sourceMappingURL=constants.js.map
@@ -17,4 +17,4 @@ export default new ContainerModule((bind => {
17
17
  bind(GraphicUtil).to(DefaultGraphicUtil).inSingletonScope(), bind(TransformUtil).to(DefaultTransformUtil).inSingletonScope(),
18
18
  bind(LayerService).to(DefaultLayerService).inSingletonScope();
19
19
  }));
20
- //# sourceMappingURL=core-modules.js.map
20
+ //# sourceMappingURL=core-modules.js.map
@@ -1,3 +1 @@
1
-
2
-
3
1
  //# sourceMappingURL=global-module.js.map
package/es/core/global.js CHANGED
@@ -238,4 +238,4 @@ let DefaultGlobal = class extends EventListenerManager {
238
238
  DefaultGlobal = __decorate([ injectable(), __param(0, inject(ContributionProvider)), __param(0, named(EnvContribution)), __metadata("design:paramtypes", [ Object ]) ], DefaultGlobal);
239
239
 
240
240
  export { DefaultGlobal };
241
- //# sourceMappingURL=global.js.map
241
+ //# sourceMappingURL=global.js.map
@@ -189,4 +189,4 @@ let DefaultTransformUtil = class {
189
189
  DefaultTransformUtil = __decorate([ injectable(), __metadata("design:paramtypes", []) ], DefaultTransformUtil);
190
190
 
191
191
  export { DefaultTransformUtil };
192
- //# sourceMappingURL=graphic-utils.js.map
192
+ //# sourceMappingURL=graphic-utils.js.map
package/es/core/index.js CHANGED
@@ -15,4 +15,4 @@ export * from "./layer-service";
15
15
  export * from "./constants";
16
16
 
17
17
  export * from "../interface/core";
18
- //# sourceMappingURL=index.js.map
18
+ //# sourceMappingURL=index.js.map
@@ -82,5 +82,4 @@ let DefaultLayerService = DefaultLayerService_1 = class {
82
82
  DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0,
83
83
  DefaultLayerService = DefaultLayerService_1 = __decorate([ injectable(), __metadata("design:paramtypes", []) ], DefaultLayerService);
84
84
 
85
- export { DefaultLayerService };
86
- //# sourceMappingURL=layer-service.js.map
85
+ export { DefaultLayerService };
package/es/core/layer.js CHANGED
@@ -112,4 +112,4 @@ export class Layer extends Group {
112
112
  }, params)), this.afterDrawCbs.forEach((c => c(this)));
113
113
  }
114
114
  }
115
- //# sourceMappingURL=layer.js.map
115
+ //# sourceMappingURL=layer.js.map
package/es/core/light.js CHANGED
@@ -23,4 +23,4 @@ export class DirectionalLight {
23
23
  export const registerDirectionalLight = () => {
24
24
  Factory.registerPlugin("DirectionalLight", DirectionalLight);
25
25
  };
26
- //# sourceMappingURL=light.js.map
26
+ //# sourceMappingURL=light.js.map
package/es/core/stage.js CHANGED
@@ -577,4 +577,4 @@ export class Stage extends Group {
577
577
  this.renderService.reInit(), this.pickerService.reInit();
578
578
  }
579
579
  }
580
- //# sourceMappingURL=stage.js.map
580
+ //# sourceMappingURL=stage.js.map
package/es/core/window.js CHANGED
@@ -162,4 +162,4 @@ let DefaultWindow = class extends EventListenerManager {
162
162
  DefaultWindow = __decorate([ injectable(), __metadata("design:paramtypes", []) ], DefaultWindow);
163
163
 
164
164
  export { DefaultWindow };
165
- //# sourceMappingURL=window.js.map
165
+ //# sourceMappingURL=window.js.map
@@ -445,7 +445,7 @@ export class Graphic extends Node {
445
445
  }
446
446
  } ]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
447
447
  type: AttributeUpdateType.STATE
448
- });
448
+ }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
449
449
  } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
450
450
  type: AttributeUpdateType.STATE
451
451
  }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
@@ -471,7 +471,7 @@ export class Graphic extends Node {
471
471
  getNormalAttribute(key) {
472
472
  var _a, _b;
473
473
  const value = this.attribute[key];
474
- return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
474
+ return this.animates && this.animates.size ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
475
475
  }
476
476
  clearStates(hasAnimation) {
477
477
  this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],