leafer-ui 2.0.9 → 2.1.0

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-CN.md CHANGED
@@ -59,11 +59,11 @@ LeaferJS 的极致性能与标准化能力,使其成为以下领域的理想
59
59
 
60
60
  LeaferJS 将 Web 图形处理的“天花板”向上推举了约 10 倍。
61
61
 
62
- | 测试项 (100万个可交互矩形) | 传统 Canvas 库 | **LeaferJS** | 提升 |
63
- | :------------------------- | :-------------------- | :----------- | :--------------- |
64
- | **首屏创建速度** | ~10 - 15 秒 | **1.28 秒** | **约快10 倍 🎉** |
65
- | **内存占用** | ~3GB (浏览器可能崩溃) | **320 MB** | **约节省 10 倍** |
66
- | **单元素拖拽帧率** | 0 - 1 FPS | **60 FPS** | **完美流畅** |
62
+ | 测试项 (100万个可交互矩形) | 传统 Canvas 库 | **LeaferJS** | 提升 |
63
+ | :------------------------- | :---------------------- | :----------- | :--------------- |
64
+ | **首屏创建速度** | ~9-15 秒 | **1.28 秒** | **约快 8 倍 🎉** |
65
+ | **内存占用** | ~2-4GB (浏览器可能崩溃) | **320 MB** | **约节省 8 倍** |
66
+ | **单元素拖拽帧率** | 0-4 FPS | **60 FPS** | **约流畅 15 倍** |
67
67
 
68
68
  测试环境: 2K屏笔记本 / Chrome V143.0,数据仅供参考,实际表现取决于硬件性能。
69
69
 
package/README.md CHANGED
@@ -59,11 +59,11 @@ With its extreme performance and standardized capabilities, LeaferJS is an ideal
59
59
 
60
60
  LeaferJS pushes the ceiling of Web graphics processing by approximately **10x**.
61
61
 
62
- | Test (1M Interactive Rectangles) | Traditional Canvas Libraries | **LeaferJS** | Improvement |
63
- | :------------------------------- | :--------------------------- | :----------- | :------------------- |
64
- | **Initial Render Time** | ~10–15 seconds | **1.28s** | **~10x faster 🎉** |
65
- | **Memory Usage** | ~3GB (may crash browser) | **320MB** | **~10x lower** |
66
- | **Drag FPS (single element)** | 0–1 FPS | **60 FPS** | **Perfectly smooth** |
62
+ | Test (1M Interactive Rectangles) | Traditional Canvas Libraries | **LeaferJS** | Improvement |
63
+ | :------------------------------- | :--------------------------- | :----------- | :---------------- |
64
+ | **Initial Render Time** | ~9–15 seconds | **1.28s** | **~8x faster 🎉** |
65
+ | **Memory Usage** | ~2-4GB (may crash browser) | **320MB** | **~8x lower** |
66
+ | **Drag FPS (single element)** | 0–4 FPS | **60 FPS** | **~15x faster** |
67
67
 
68
68
  Test environment: 2K laptop screen / Chrome V143.0. Results are for reference only; actual performance depends on hardware.
69
69
 
package/dist/web.js CHANGED
@@ -6663,7 +6663,7 @@ var LeaferUI = function(exports) {
6663
6663
  this.levelMap = null;
6664
6664
  }
6665
6665
  }
6666
- const version = "2.0.9";
6666
+ const version = "2.1.0";
6667
6667
  const debug$5 = Debug.get("LeaferCanvas");
6668
6668
  class LeaferCanvas extends LeaferCanvasBase {
6669
6669
  set zIndex(zIndex) {
@@ -7806,8 +7806,8 @@ var LeaferUI = function(exports) {
7806
7806
  return this.__getRealStrokeWidth();
7807
7807
  }
7808
7808
  get __maxStrokeWidth() {
7809
- const t = this;
7810
- return t.__hasMultiStrokeStyle ? Math.max(t.__hasMultiStrokeStyle, t.strokeWidth) : t.strokeWidth;
7809
+ const t = this, strokeWidth = t.__hasStrokeSides || t.strokeWidth;
7810
+ return t.__hasMultiStrokeStyle ? Math.max(t.__hasMultiStrokeStyle, strokeWidth) : strokeWidth;
7811
7811
  }
7812
7812
  get __hasMultiPaint() {
7813
7813
  const t = this;
@@ -7908,6 +7908,10 @@ var LeaferUI = function(exports) {
7908
7908
  }
7909
7909
  return strokeWidth;
7910
7910
  }
7911
+ __checkComplex() {
7912
+ const t = this;
7913
+ stintSet$3(t, "__complex", t.__isFills || t.__isStrokes || t.cornerRadius || t.__useEffect);
7914
+ }
7911
7915
  __setPaint(attrName, value) {
7912
7916
  this.__setInput(attrName, value);
7913
7917
  const layout = this.__leaf.__layout;
@@ -8122,7 +8126,7 @@ var LeaferUI = function(exports) {
8122
8126
  data.__useEffect = !!(shadow || otherEffect);
8123
8127
  }
8124
8128
  data.__checkSingle();
8125
- stintSet$2(data, "__complex", data.__isFills || data.__isStrokes || data.cornerRadius || data.__useEffect);
8129
+ data.__checkComplex();
8126
8130
  },
8127
8131
  __drawFast(canvas, options) {
8128
8132
  drawFast(this, canvas, options);