leafer-ui 2.2.2 → 2.2.3

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.
package/README.md CHANGED
@@ -114,9 +114,9 @@ leafer.add(rect)
114
114
 
115
115
  从“一个引擎”到“一个成熟产品”之间存在巨大的研发鸿沟。为了支持开源引擎的长久维护,并协助企业跨越复杂场景的开发瓶颈,我们构建了透明且健康的生态:
116
116
 
117
- - **LeaferJS 永久开源 (MIT):** 核心功能和基础插件始终保持开源与自由,保障每一位开发者的选型安全与技术掌控权。
118
- - **[PxGrow](https://www.pxgrow.com/) 商业插件 (可选):** 专注于解决**工业级应用**中的复杂业务难题。它封装了高级编辑器套件、极端场景性能优化及复杂图形算法,旨在帮企业节省数月甚至数年的业务功能研发周期。
119
- - **良性循环与长期主义:** 所有的商业收入将用于反哺开源引擎的持续迭代,确保 LeaferJS 始终处于 Web 图形技术的领先水平。
117
+ - **LeaferJS 永久开源 (MIT):** 核心功能和基础插件始终保持开源与自由,能够满足绝大多数项目需求,让开发者拥有安全、可控、可持续的技术选择,无需担心核心能力受到商业限制。
118
+ - **[PxGrow](https://www.pxgrow.com/) 提供可选商业插件:** 专注于解决**工业级应用**中的复杂业务难题。包括专业编辑器套件、复杂图形算法与性能优化能力,帮助企业节省数月甚至数年的研发投入。
119
+ - **良性循环与长期主义:** 开发者因开源受益,企业因商业能力提效,而商业支持又持续推动 LeaferJS 的发展与创新,形成开放、透明、可持续的发展循环。
120
120
 
121
121
  ### LeaferJS 仓库组成一览表
122
122
 
package/dist/web.js CHANGED
@@ -3926,7 +3926,7 @@ var LeaferUI = function(exports) {
3926
3926
  patternTasker: Resource.queue,
3927
3927
  get(config, type) {
3928
3928
  let image = Resource.get(config.url);
3929
- if (!image) Resource.set(config.url, image = type === "film" ? Creator.film(config) : Creator.image(config));
3929
+ if (!image) Resource.set(config.url, image = Creator[type || "image"](config));
3930
3930
  image.use++;
3931
3931
  return image;
3932
3932
  },
@@ -5933,6 +5933,9 @@ var LeaferUI = function(exports) {
5933
5933
  get isLeafer() {
5934
5934
  return false;
5935
5935
  }
5936
+ get isFrame() {
5937
+ return false;
5938
+ }
5936
5939
  get isBranch() {
5937
5940
  return false;
5938
5941
  }
@@ -6074,6 +6077,16 @@ var LeaferUI = function(exports) {
6074
6077
  }
6075
6078
  }
6076
6079
  }
6080
+ __bindFrame(frame) {
6081
+ if (this.isFrame && frame !== null) frame = this;
6082
+ this.frame = frame;
6083
+ if (this.isBranch) {
6084
+ const {children: children} = this;
6085
+ for (let i = 0, len = children.length; i < len; i++) {
6086
+ children[i].__bindFrame(frame);
6087
+ }
6088
+ }
6089
+ }
6077
6090
  setAttr(name, value) {
6078
6091
  this[name] = value;
6079
6092
  }
@@ -6380,6 +6393,7 @@ var LeaferUI = function(exports) {
6380
6393
  child.__bindLeafer(this.leafer);
6381
6394
  if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
6382
6395
  }
6396
+ if (this.isFrame) child.__bindFrame(this);
6383
6397
  this.__layout.affectChildrenSort && this.__layout.childrenSortChange();
6384
6398
  }
6385
6399
  addMany(...children) {
@@ -6435,6 +6449,7 @@ var LeaferUI = function(exports) {
6435
6449
  if (this.leafer.hitCanvasManager) this.leafer.hitCanvasManager.clear();
6436
6450
  }
6437
6451
  }
6452
+ if (this.isFrame) child.__bindFrame(null);
6438
6453
  }
6439
6454
  __emitChildEvent(type, child) {
6440
6455
  const event = new ChildEvent(type, child, this);
@@ -6588,7 +6603,7 @@ var LeaferUI = function(exports) {
6588
6603
  this.levelMap = null;
6589
6604
  }
6590
6605
  }
6591
- const version = "2.2.1";
6606
+ const version = "2.2.3";
6592
6607
  const debug$5 = Debug.get("LeaferCanvas");
6593
6608
  class LeaferCanvas extends LeaferCanvasBase {
6594
6609
  set zIndex(zIndex) {
@@ -8154,9 +8169,6 @@ var LeaferUI = function(exports) {
8154
8169
  get app() {
8155
8170
  return this.leafer && this.leafer.app;
8156
8171
  }
8157
- get isFrame() {
8158
- return false;
8159
- }
8160
8172
  set strokeWidthFixed(value) {
8161
8173
  this.strokeScaleFixed = value;
8162
8174
  }