leafer-ui 1.5.0 → 1.5.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.
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
  <img width="98" titel="gitee" src="https://www.leaferjs.com/svg/gitee-stars.svg" />
20
20
  </a>
21
21
  <a target="_blank" href="https://github.com/leaferjs/leafer-ui" aria-label="github" rel="noopener">
22
- <img width="120" title="github" src="https://www.leaferjs.com/svg/github-stars.svg" />
22
+ <img width="120" title="github" src="https://www.leaferjs.com/svg/github-stars.svg?d=0324" />
23
23
  </a>
24
24
  </div>
25
25
 
@@ -78,7 +78,7 @@ LeaferJS 试行 [4 天工作制](https://www.leaferjs.com/ui/blog/2025-02-06.htm
78
78
 
79
79
  【Bug/建议】xxxxxxxxxxx 标题 xxxxxxxxxxxxxx
80
80
 
81
- 环境:电脑 + window 11 + chrome 131 + leaferjs 1.5.0
81
+ 环境:电脑 + window 11 + chrome 131 + leaferjs 1.5.1
82
82
 
83
83
  复现步骤:请提供详细的复现逻辑及可直接运行的代码,以便更快解决问题。
84
84
  ```
@@ -98,7 +98,7 @@ LeaferJS 试行 [4 天工作制](https://www.leaferjs.com/ui/blog/2025-02-06.htm
98
98
 
99
99
  【leaferjs】xxxxxxxxxxx 标题 xxxxxxxxxxxxxx
100
100
 
101
- 环境:电脑 + window 11 + chrome 131 + leaferjs 1.5.0
101
+ 环境:电脑 + window 11 + chrome 131 + leaferjs 1.5.1
102
102
 
103
103
  #LeaferJS (点击知乎提问框底部的 # 号,可绑定话题)
104
104
  ```
@@ -127,7 +127,7 @@ LeaferJS 致力于实现一套简洁、开放、现代化的 UI 绘图语言标
127
127
 
128
128
  通过不断革新的图形渲染技术、配套支持, 吸引更多的开发者加入使用,建立起一个开放的生态环境,沟通有无,互相从中受益,推动行业的快速发展,并诞生出更多有创意的技术和产品。
129
129
 
130
- 我们的目标不仅是让它成为前沿的 2D 和未来的 3D 引擎技术,还希望它能够为开发者带来极致的开发体验,助力开发者快速构建 AI 时代的网页、应用、设计、画布、游戏和动画等可视化生产力工具(如下一代 local-first Figma、Miro、Notion、Unity、Adobe、Canva、Webflow 等)。
130
+ 我们的目标不仅是打造最前沿的 2D 和未来的 3D 引擎技术,更要创造一套简洁、开放、现代化的 UI 绘图标准。我们希望为开发者带来极致的开发体验,助力他们快速构建 AI 时代的网页、应用、设计、画布、游戏和动画等可视化生产力工具,推动下一代本地优先的 Figma、Miro、Notion、Unity、Adobe、Canva、Webflow 等创新产品的诞生。
131
131
 
132
132
  ![leaferjs](https://www.leaferjs.com/ui/svg/leaferjs.svg?d=013007)
133
133
 
package/dist/web.cjs CHANGED
@@ -124,7 +124,7 @@ class LeaferCanvas extends core.LeaferCanvasBase {
124
124
  else {
125
125
  window.addEventListener('resize', this.windowListener = () => {
126
126
  const pixelRatio = core.Platform.devicePixelRatio;
127
- if (this.pixelRatio !== pixelRatio) {
127
+ if (!this.config.pixelRatio && this.pixelRatio !== pixelRatio) {
128
128
  const { width, height } = this;
129
129
  this.emitResize({ width, height, pixelRatio });
130
130
  }
@@ -141,7 +141,7 @@ class LeaferCanvas extends core.LeaferCanvasBase {
141
141
  checkAutoBounds(parentSize) {
142
142
  const view = this.view;
143
143
  const { x, y, width, height } = this.autoBounds.getBoundsFrom(parentSize);
144
- const size = { width, height, pixelRatio: core.Platform.devicePixelRatio };
144
+ const size = { width, height, pixelRatio: this.config.pixelRatio ? this.pixelRatio : core.Platform.devicePixelRatio };
145
145
  if (!this.isSameSize(size)) {
146
146
  const { style } = view;
147
147
  style.marginLeft = x + 'px';