leafer-ui 2.2.11 → 2.3.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.md +7 -234
- package/dist/web.js +58 -22
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +62 -23
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -161,242 +161,15 @@ LeaferJS 是一个持续打磨了五年的原创开源引擎。我们致力于
|
|
|
161
161
|
|
|
162
162
|
## 致谢贡献者
|
|
163
163
|
|
|
164
|
+
[每一位参与开源森林的创作者](https://www.leafer.pro/#creator)
|
|
165
|
+
|
|
164
166
|
[每一位贡献代码的社区成员](https://github.com/leaferjs/leafer-ui/graphs/contributors)
|
|
165
167
|
|
|
166
|
-
[
|
|
167
|
-
|
|
168
|
-
##
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 15px;">
|
|
172
|
-
<a target="_blank" href="https://yzllq.com/">
|
|
173
|
-
<img width="180" title="一个浏览器打开多组账户 - 电商、自媒体、矩阵营销的便捷账户管理方式" src="https://www.leaferjs.com/image/sponsor/gold/yzllq.png" loading="lazy" />
|
|
174
|
-
</a>
|
|
175
|
-
<a target="_blank" href="https://easysearch.cn">
|
|
176
|
-
<img width="180" title="Easysearch - 企业级的分布式搜索型数据库" src="https://www.leaferjs.com/image/sponsor/gold/easysearch.png" loading="lazy" />
|
|
177
|
-
</a>
|
|
178
|
-
<a target="_blank" href="https://boardos.online">
|
|
179
|
-
<img width="180" title="在线实时白板协作系统" src="https://www.leaferjs.com/image/sponsor/gold/boardos.svg" loading="lazy" />
|
|
180
|
-
</a>
|
|
181
|
-
<a target="_blank" href="https://www.photiu.ai">
|
|
182
|
-
<img width="180" title="Photiu" src="https://www.leaferjs.com/image/sponsor/gold/photiu.png" loading="lazy" />
|
|
183
|
-
</a>
|
|
184
|
-
<a target="_blank" href="https://xpai.design">
|
|
185
|
-
<img width="180" title="迅排设计" src="https://www.leaferjs.com/image/sponsor/gold/xp.jpg" loading="lazy" />
|
|
186
|
-
</a>
|
|
187
|
-
<a target="_blank" href="https://github.com/dromara/yft-design">
|
|
188
|
-
<img width="180" title="yft-design" src="https://www.leaferjs.com/image/sponsor/gold/yft.jpg" loading="lazy" />
|
|
189
|
-
</a>
|
|
190
|
-
<a target="_blank" href="https://www.finclip.com/landing/miniappgame?from=leafer">
|
|
191
|
-
<img width="180" title="FinClip" src="https://www.leaferjs.com/image/sponsor/gold/finclip.jpg" loading="lazy" />
|
|
192
|
-
</a>
|
|
193
|
-
<a target="_blank" href="https://f.style">
|
|
194
|
-
<img width="180" title="hiif" src="https://www.leaferjs.com/image/sponsor/gold/hiif.jpg" loading="lazy" />
|
|
195
|
-
</a>
|
|
196
|
-
<a target="_blank" href="https://www.seafox.cc">
|
|
197
|
-
<img width="180" title="seafox" src="https://www.leaferjs.com/image/sponsor/gold/seafox.jpg" loading="lazy" />
|
|
198
|
-
</a>
|
|
199
|
-
<a target="_blank" href="https://dooring.vip">
|
|
200
|
-
<img width="180" title="dooring" src="https://www.leaferjs.com/image/sponsor/gold/dooring.jpg" loading="lazy" />
|
|
201
|
-
</a>
|
|
202
|
-
<a target="_blank" href="https://pro.kuaitu.cc">
|
|
203
|
-
<img width="180" title="快图设计" src="https://www.leaferjs.com/image/sponsor/gold/kuaitu.jpg" loading="lazy" />
|
|
204
|
-
</a>
|
|
205
|
-
<a target="_blank" href="https://chensuiyi.me">
|
|
206
|
-
<img width="180" title="前端之虎陈随易" src="https://www.leaferjs.com/image/sponsor/gold/chensuiyi.jpg" loading="lazy" />
|
|
207
|
-
</a>
|
|
208
|
-
<a target="_blank" href="http://www.yunform.cn">
|
|
209
|
-
<img width="180" title="数据查询录入表单页面制作效率工具" src="https://www.leaferjs.com/image/sponsor/gold/yunform.svg" loading="lazy" />
|
|
210
|
-
</a>
|
|
211
|
-
<a target="_blank" href="https://www.pxgrow.com/vip/logo/">
|
|
212
|
-
<img width="180" title="赞助我们" src="https://www.leaferjs.com/image/sponsor/gold/add.jpg" loading="lazy" />
|
|
213
|
-
</a>
|
|
214
|
-
</p>
|
|
215
|
-
|
|
216
|
-
<p><h3 align="center">银牌赞助</h3></p>
|
|
217
|
-
<p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 5px;">
|
|
218
|
-
<a target="_blank" href="">
|
|
219
|
-
<img width="40" title="怜生" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
|
|
220
|
-
</a>
|
|
221
|
-
<a target="_blank" href="https://pro.kuaitu.cc">
|
|
222
|
-
<img width="40" title="快图设计" src="https://www.pxgrow.com/image/user/default/7.jpg" loading="lazy" />
|
|
223
|
-
</a>
|
|
224
|
-
<a target="_blank" href="">
|
|
225
|
-
<img width="40" title="black" src="https://api.pxgrow.com/uploads/avatar/249/AzA/4v/u.jpg" loading="lazy" />
|
|
226
|
-
</a>
|
|
227
|
-
<a target="_blank" href="">
|
|
228
|
-
<img width="40" title="ARAM" src="https://api.pxgrow.com/uploads/avatar/3Pv/P26/zw/u.jpg" loading="lazy" />
|
|
229
|
-
</a>
|
|
230
|
-
<a target="_blank" href="">
|
|
231
|
-
<img width="40" title="Winning" src="https://www.pxgrow.com/image/user/default/4.jpg" loading="lazy" />
|
|
232
|
-
</a>
|
|
233
|
-
<a target="_blank" href="">
|
|
234
|
-
<img width="40" title="刘洋" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
|
|
235
|
-
</a>
|
|
236
|
-
<a target="_blank" href="">
|
|
237
|
-
<img width="40" title="张老爷" src="https://api.pxgrow.com/uploads/avatar/76z/6wz/Px/u.jpg" loading="lazy" />
|
|
238
|
-
</a>
|
|
239
|
-
<a target="_blank" href="">
|
|
240
|
-
<img width="40" title="KevinJiaCN" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
|
|
241
|
-
</a>
|
|
242
|
-
<a target="_blank" href="">
|
|
243
|
-
<img width="40" title="goosen" src="https://www.pxgrow.com/image/sponsor/user/122.jpeg" loading="lazy" />
|
|
244
|
-
</a>
|
|
245
|
-
<a target="_blank" href="">
|
|
246
|
-
<img width="40" title="dev_chen" src="https://www.pxgrow.com/image/sponsor/user/137.jpg" loading="lazy" />
|
|
247
|
-
</a>
|
|
248
|
-
<a target="_blank" href="frameelf">
|
|
249
|
-
<img width="40" title="o" src="https://api.pxgrow.com/uploads/avatar/3Pv/P2S/ww/u.jpg" loading="lazy" />
|
|
250
|
-
</a>
|
|
251
|
-
<a target="_blank" href="">
|
|
252
|
-
<img width="40" title="Y" src="https://www.pxgrow.com/image/sponsor/user/131.jpg" loading="lazy" />
|
|
253
|
-
</a>
|
|
254
|
-
<a target="_blank" href="https://github.com/daodaolee">
|
|
255
|
-
<img width="40" title="道里" src="https://www.pxgrow.com/image/sponsor/user/108.jpg" loading="lazy" />
|
|
256
|
-
</a>
|
|
257
|
-
<a target="_blank" href="">
|
|
258
|
-
<img width="40" title="dong" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
|
|
259
|
-
</a>
|
|
260
|
-
<a target="_blank" href="">
|
|
261
|
-
<img width="40" title="三一" src="https://www.pxgrow.com/image/sponsor/user/151.jpeg" loading="lazy" />
|
|
262
|
-
</a>
|
|
263
|
-
<a target="_blank" href="https://www.fastadmin.net">
|
|
264
|
-
<img width="40" title="F4nniu" src="https://api.pxgrow.com/uploads/avatar/3Pv/P26/P3/u.jpg" loading="lazy" />
|
|
265
|
-
</a>
|
|
266
|
-
<a target="_blank" href="">
|
|
267
|
-
<img width="40" title="风之影" src="https://www.pxgrow.com/image/sponsor/user/81.jpg" loading="lazy" />
|
|
268
|
-
</a>
|
|
269
|
-
<a target="_blank" href="">
|
|
270
|
-
<img width="40" title="😊" src="https://www.pxgrow.com/image/sponsor/user/79.jpg" loading="lazy" />
|
|
271
|
-
</a>
|
|
272
|
-
<a target="_blank" href="https://pro.kuaitu.cc/">
|
|
273
|
-
<img width="40" title="快图设计" src="https://www.pxgrow.com/image/sponsor/user/72.jpg" loading="lazy" />
|
|
274
|
-
</a>
|
|
275
|
-
<a target="_blank" href="">
|
|
276
|
-
<img width="40" title="ycteng" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
|
|
277
|
-
</a>
|
|
278
|
-
<a target="_blank" href="https://afdian.com/a/herobeast">
|
|
279
|
-
<img width="40" title="herobeast" src="https://www.pxgrow.com/image/sponsor/user/63.jpeg" loading="lazy" />
|
|
280
|
-
</a>
|
|
281
|
-
<a target="_blank" href="">
|
|
282
|
-
<img width="40" title="Evel" src="https://www.pxgrow.com/image/sponsor/user/62.jpeg" loading="lazy" />
|
|
283
|
-
</a>
|
|
284
|
-
<a target="_blank" href="">
|
|
285
|
-
<img width="40" title="icezeros" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
|
|
286
|
-
</a>
|
|
287
|
-
<a target="_blank" href="">
|
|
288
|
-
<img width="40" title="林伟强@青柠设计" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
|
|
289
|
-
</a>
|
|
290
|
-
<a target="_blank" href="https://github.com/Misakey-Mikoto">
|
|
291
|
-
<img width="40" title="misakey" src="https://www.pxgrow.com/image/sponsor/user/orange.png" loading="lazy" />
|
|
292
|
-
</a>
|
|
293
|
-
<a target="_blank" href="">
|
|
294
|
-
<img width="40" title="junna" src="https://www.pxgrow.com/image/sponsor/user/57.jpeg" loading="lazy" />
|
|
295
|
-
</a>
|
|
296
|
-
<a target="_blank" href="http://www.nickspace.cn">
|
|
297
|
-
<img width="40" title="NickSpace" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
|
|
298
|
-
</a>
|
|
299
|
-
<a target="_blank" href="https://afdian.com/a/ziiziz">
|
|
300
|
-
<img width="40" title="YGG" src="https://www.pxgrow.com/image/sponsor/user/55.jpeg" loading="lazy" />
|
|
301
|
-
</a>
|
|
302
|
-
<a target="_blank" href="">
|
|
303
|
-
<img width="40" title="tony" src="https://www.pxgrow.com/image/sponsor/user/51.jpeg" loading="lazy" />
|
|
304
|
-
</a>
|
|
305
|
-
<a target="_blank" href="">
|
|
306
|
-
<img width="40" title="lk" src="https://api.pxgrow.com/uploads/avatar/39A/334/wC/u.jpg" loading="lazy" />
|
|
307
|
-
</a>
|
|
308
|
-
<a target="_blank" href="">
|
|
309
|
-
<img width="40" title="用户z89CSwv9" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
|
|
310
|
-
</a>
|
|
311
|
-
<a target="_blank" href="">
|
|
312
|
-
<img width="40" title="南" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
|
|
313
|
-
</a>
|
|
314
|
-
<a target="_blank" href="">
|
|
315
|
-
<img width="40" title=".." src="https://www.pxgrow.com/image/sponsor/user/44.jpg" loading="lazy" />
|
|
316
|
-
</a>
|
|
317
|
-
<a target="_blank" href="">
|
|
318
|
-
<img width="40" title="__tynam" src="https://www.pxgrow.com/image/sponsor/user/43.jpg" loading="lazy" />
|
|
319
|
-
</a>
|
|
320
|
-
<a target="_blank" href="https://github.com/zhixiaotong">
|
|
321
|
-
<img width="40" title="知晓同丶" src="https://www.pxgrow.com/image/sponsor/user/42.png" loading="lazy" />
|
|
322
|
-
</a>
|
|
323
|
-
<a target="_blank" href="">
|
|
324
|
-
<img width="40" title="馒头" src="https://www.pxgrow.com/image/sponsor/user/41.jpeg" loading="lazy" />
|
|
325
|
-
</a>
|
|
326
|
-
<a target="_blank" href="">
|
|
327
|
-
<img width="40" title="刘杨" src="https://www.pxgrow.com/image/sponsor/user/26.jpeg" loading="lazy" />
|
|
328
|
-
</a>
|
|
329
|
-
<a target="_blank" href="">
|
|
330
|
-
<img width="40" title="Biu" src="https://www.pxgrow.com/image/sponsor/user/32.jpeg" loading="lazy" />
|
|
331
|
-
</a>
|
|
332
|
-
<a target="_blank" href="https://www.leaferjs.com">
|
|
333
|
-
<img width="40" title="Leafer" src="https://www.pxgrow.com/image/sponsor/user/4.jpeg" loading="lazy" />
|
|
334
|
-
</a>
|
|
335
|
-
<a target="_blank" href="">
|
|
336
|
-
<img width="40" title="sunboy" src="https://www.pxgrow.com/image/sponsor/user/36.jpeg" loading="lazy" />
|
|
337
|
-
</a>
|
|
338
|
-
<a target="_blank" href="">
|
|
339
|
-
<img width="40" title="张恒来啦" src="https://www.pxgrow.com/image/sponsor/user/35.jpeg" loading="lazy" />
|
|
340
|
-
</a>
|
|
341
|
-
<a target="_blank" href="">
|
|
342
|
-
<img width="40" title="呆若牦牛" src="https://www.pxgrow.com/image/sponsor/user/34.jpeg" loading="lazy" />
|
|
343
|
-
</a>
|
|
344
|
-
<a target="_blank" href="">
|
|
345
|
-
<img width="40" title="艳霞" src="https://www.pxgrow.com/image/sponsor/user/33.jpeg" loading="lazy" />
|
|
346
|
-
</a>
|
|
347
|
-
<a target="_blank" href="">
|
|
348
|
-
<img width="40" title="skywalker512" src="https://www.pxgrow.com/image/sponsor/user/21.jpeg" loading="lazy" />
|
|
349
|
-
</a>
|
|
350
|
-
<a target="_blank" href="https://www.u-tools.cn/plugins/detail/%E6%88%AA%E5%9B%BE%E5%B7%A5%E5%85%B7%20Plus/index.html">
|
|
351
|
-
<img width="40" title="xiaou@截图工具" src="https://www.pxgrow.com/image/sponsor/user/135.png" loading="lazy" />
|
|
352
|
-
</a>
|
|
353
|
-
<a target="_blank" href="">
|
|
354
|
-
<img width="40" title="黄鸭梨" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
|
|
355
|
-
</a>
|
|
356
|
-
<a target="_blank" href="">
|
|
357
|
-
<img width="40" title="子洋" src="https://www.pxgrow.com/image/sponsor/user/17.jpeg" loading="lazy" />
|
|
358
|
-
</a>
|
|
359
|
-
<a target="_blank" href="">
|
|
360
|
-
<img width="40" title="一只胖憨憨" src="https://api.pxgrow.com/uploads/avatar/249/AzA/32/u.jpg" loading="lazy" />
|
|
361
|
-
</a>
|
|
362
|
-
<a target="_blank" href="danshen.me">
|
|
363
|
-
<img width="40" title="channely" src="https://www.pxgrow.com/image/sponsor/user/15.jpeg" loading="lazy" />
|
|
364
|
-
</a>
|
|
365
|
-
<a target="_blank" href="">
|
|
366
|
-
<img width="40" title="ibryang" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
|
|
367
|
-
</a>
|
|
368
|
-
<a target="_blank" href="">
|
|
369
|
-
<img width="40" title="用户3PvP2Sxw" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
|
|
370
|
-
</a>
|
|
371
|
-
<a target="_blank" href="">
|
|
372
|
-
<img width="40" title="kooriookami" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
|
|
373
|
-
</a>
|
|
374
|
-
<a target="_blank" href="">
|
|
375
|
-
<img width="40" title="毛豆花生" src="https://www.pxgrow.com/image/sponsor/user/8.jpeg" loading="lazy" />
|
|
376
|
-
</a>
|
|
377
|
-
<a target="_blank" href="https://afdian.com/a/programschool">
|
|
378
|
-
<img width="40" title="编程学院" src="https://www.pxgrow.com/image/sponsor/user/7.jpg" loading="lazy" />
|
|
379
|
-
</a>
|
|
380
|
-
<a target="_blank" href="https://afdian.com/u/8230187ef5a811eeba2d5254001e7c00">
|
|
381
|
-
<img width="40" title="Jikun" src="https://www.pxgrow.com/image/sponsor/user/5.jpeg" loading="lazy" />
|
|
382
|
-
</a>
|
|
383
|
-
<a target="_blank" href="">
|
|
384
|
-
<img width="40" title="robot" src="https://www.pxgrow.com/image/sponsor/user/29.jpeg" loading="lazy" />
|
|
385
|
-
</a>
|
|
386
|
-
<a target="_blank" href="">
|
|
387
|
-
<img width="40" title="黄某人" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
|
|
388
|
-
</a>
|
|
389
|
-
<a target="_blank" href="">
|
|
390
|
-
<img width="40" title="爱发电用户_xugk" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
|
|
391
|
-
</a>
|
|
392
|
-
<a target="_blank" href="https://www.pxgrow.com/vip/logo/">
|
|
393
|
-
<img width="40" title="赞助我们" src="https://www.leaferjs.com/image/sponsor/silver/add.jpg" loading="lazy" />
|
|
394
|
-
</a>
|
|
395
|
-
</p>
|
|
396
|
-
|
|
397
|
-
<p><h3 align="center">铜牌赞助</h3></p>
|
|
398
|
-
<p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 15px;">
|
|
399
|
-
parox2014 QGG 小白不白 用户zw8T394C 用户zw8T398C 龙眼吃多了上火 用户zw8T392T 用户z89CSw69 用户CzP9SCAz Kim 用户249AzA8v l0f5c7bf 夏先生 yinuo 用户3wTwAz78 用户zw8T39zT 用户249AzA82 用户CzP9SCvz 用户39A334xT 用户3wTwAz3x 用户zw8T39zC 稀饭、微凉 用户CzP9SCT4 便宜VPS服务器 菲鸽 szhua Cheng Suezp beyond 用户3PvP2S63 o Arvin finallycc 用户39A3346C 大雷 用户CzP9SC4z 随风 用户z89CSwT9 用户3wTwAzCx UPMuling 军杨 桔子雨工作室 用户zw8T37xC 前端炒饭仔 用户z89CSw46 崮生 互动矩阵 ZhanYoHo 何佳Q coderhyh 早上好啊 快图设计 do 毛哥哥 迅排设计 用户z89CSw86 糖果 南城以北 黑色摩天仑 Charm Lauginwing 在路上 Jerry 张余🌈 李狗嗨。💢 用户zw8T376T 用户249AzA2v ʚ LMT ɞ 格子 等等 goosen F4nniu 梁福斌 江万江 杨超 ToB Dev 前端之虎陈随易 A☀️云☀️A zhk 爱发电用户_c9c82 轻简历 爱发电用户_0fac0 wangyesheji.cn 风间 爱发电用户_Tqsm 爱发电用户_6KpE 星小志 zwm 爱发电用户_3725c Noth1ng 纳西妲の√ 爱发电用户_Ahb9 爱发电用户_7617d 冷漠 爱发电用户_9RXB 今日值得读 爱发电用户_49sT 爱发电用户_NFCS 爱发电用户_43ad8 爱发电用户_30455 砖吐筷筷 xiaozhang 爱发电用户_b47b3 longbow1998 爱发电用户_5d755 爱发电用户_b76b8 爱发电用户_e70c2 xiaou@截图工具 ousiri 爱发电用户_039dc 花祁 爱发电用户_99f39 坤坤 爱发电用户_X6hp ycteng 曹吉美爸爸 啸沧海 Ronny 爱发电用户_UXEV Biu 王志强 SaltedFish 爱发电用户_76f9d PD.新城คิดถึง 糖颂缘冥倾 ALBERT. 爱发电用户_Pbm7 Leafer 赞助我们 </p>
|
|
168
|
+
[早期参与生态的社区成员](https://www.leaferjs.com/ui/contribute/)
|
|
169
|
+
|
|
170
|
+
## 致谢赞助商
|
|
171
|
+
|
|
172
|
+
[每一位参与赞助过我们的用户](https://www.leaferjs.com/#footer-sponsor)
|
|
400
173
|
|
|
401
174
|
## License
|
|
402
175
|
|
package/dist/web.js
CHANGED
|
@@ -433,7 +433,7 @@ var LeaferUI = function(exports) {
|
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
435
|
const {sin: sin$5, cos: cos$5, acos: acos, sqrt: sqrt$3} = Math;
|
|
436
|
-
const {float: float$
|
|
436
|
+
const {float: float$4} = MathHelper;
|
|
437
437
|
const tempPoint$5 = {};
|
|
438
438
|
function getWorld() {
|
|
439
439
|
return Object.assign(Object.assign(Object.assign({}, getMatrixData()), getBoundsData()), {
|
|
@@ -681,12 +681,12 @@ var LeaferUI = function(exports) {
|
|
|
681
681
|
const cosR = c / scaleY;
|
|
682
682
|
rotation = PI_2 - (d > 0 ? acos(-cosR) : -acos(cosR));
|
|
683
683
|
}
|
|
684
|
-
const cosR = float$
|
|
684
|
+
const cosR = float$4(cos$5(rotation));
|
|
685
685
|
const sinR = sin$5(rotation);
|
|
686
|
-
scaleX = float$
|
|
687
|
-
skewX = cosR ? float$
|
|
688
|
-
skewY = cosR ? float$
|
|
689
|
-
rotation = float$
|
|
686
|
+
scaleX = float$4(scaleX), scaleY = float$4(scaleY);
|
|
687
|
+
skewX = cosR ? float$4((c / scaleY + sinR) / cosR / OneRadian, 9) : 0;
|
|
688
|
+
skewY = cosR ? float$4((b / scaleX - sinR) / cosR / OneRadian, 9) : 0;
|
|
689
|
+
rotation = float$4(rotation / OneRadian);
|
|
690
690
|
} else {
|
|
691
691
|
scaleX = a;
|
|
692
692
|
scaleY = d;
|
|
@@ -728,7 +728,7 @@ var LeaferUI = function(exports) {
|
|
|
728
728
|
}
|
|
729
729
|
};
|
|
730
730
|
const M$6 = MatrixHelper;
|
|
731
|
-
const {float: float$
|
|
731
|
+
const {float: float$3} = MathHelper;
|
|
732
732
|
const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
|
|
733
733
|
const {sin: sin$4, cos: cos$4, abs: abs$6, sqrt: sqrt$2, atan2: atan2$2, min: min$2, round: round$2} = Math;
|
|
734
734
|
const PointHelper = {
|
|
@@ -871,7 +871,7 @@ var LeaferUI = function(exports) {
|
|
|
871
871
|
return points;
|
|
872
872
|
},
|
|
873
873
|
isSame(t, point, quick) {
|
|
874
|
-
return quick ? t.x === point.x && t.y === point.y : float$
|
|
874
|
+
return quick ? t.x === point.x && t.y === point.y : float$3(t.x) === float$3(point.x) && float$3(t.y) === float$3(point.y);
|
|
875
875
|
},
|
|
876
876
|
reset(t) {
|
|
877
877
|
t.x = t.y = 0;
|
|
@@ -1206,7 +1206,7 @@ var LeaferUI = function(exports) {
|
|
|
1206
1206
|
};
|
|
1207
1207
|
const {tempPointBounds: tempPointBounds$1, setPoint: setPoint$2, addPoint: addPoint$2, toBounds: toBounds$2} = TwoPointBoundsHelper;
|
|
1208
1208
|
const {toOuterPoint: toOuterPoint$2} = MatrixHelper;
|
|
1209
|
-
const {float: float$
|
|
1209
|
+
const {float: float$2, fourNumber: fourNumber} = MathHelper;
|
|
1210
1210
|
const {floor: floor$1, ceil: ceil$1} = Math;
|
|
1211
1211
|
let right$1, bottom$1, boundsRight, boundsBottom;
|
|
1212
1212
|
const point = {};
|
|
@@ -1375,10 +1375,10 @@ var LeaferUI = function(exports) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
},
|
|
1377
1377
|
float(t, maxLength) {
|
|
1378
|
-
t.x = float$
|
|
1379
|
-
t.y = float$
|
|
1380
|
-
t.width = float$
|
|
1381
|
-
t.height = float$
|
|
1378
|
+
t.x = float$2(t.x, maxLength);
|
|
1379
|
+
t.y = float$2(t.y, maxLength);
|
|
1380
|
+
t.width = float$2(t.width, maxLength);
|
|
1381
|
+
t.height = float$2(t.height, maxLength);
|
|
1382
1382
|
},
|
|
1383
1383
|
add(t, bounds, isPoint) {
|
|
1384
1384
|
right$1 = t.x + t.width;
|
|
@@ -3516,6 +3516,7 @@ var LeaferUI = function(exports) {
|
|
|
3516
3516
|
const {M: M, L: L$1, Z: Z} = PathCommandMap;
|
|
3517
3517
|
const {getCenterX: getCenterX, getCenterY: getCenterY} = PointHelper;
|
|
3518
3518
|
const {arcTo: arcTo} = PathCommandDataHelper;
|
|
3519
|
+
const {float: float$1} = MathHelper;
|
|
3519
3520
|
const PathCorner = {
|
|
3520
3521
|
smooth(data, cornerRadius, _cornerSmoothing) {
|
|
3521
3522
|
let command, lastCommand, commandLen, startXIndex, startYIndex, smoothLen;
|
|
@@ -3556,7 +3557,8 @@ var LeaferUI = function(exports) {
|
|
|
3556
3557
|
break;
|
|
3557
3558
|
|
|
3558
3559
|
case Z:
|
|
3559
|
-
|
|
3560
|
+
if (float$1(x) === float$1(startX) && float$1(y) === float$1(startY)) x = lastX,
|
|
3561
|
+
y = lastY; else arcTo(smooth, x, y, startX, startY, cornerRadius, lastX, lastY, three);
|
|
3560
3562
|
break;
|
|
3561
3563
|
|
|
3562
3564
|
default:
|
|
@@ -4718,10 +4720,11 @@ var LeaferUI = function(exports) {
|
|
|
4718
4720
|
hasOffset(t) {
|
|
4719
4721
|
return t.offsetX || t.offsetY;
|
|
4720
4722
|
},
|
|
4721
|
-
hasParent(p, parent) {
|
|
4723
|
+
hasParent(p, parent, minLevel) {
|
|
4722
4724
|
if (!parent) return false;
|
|
4723
4725
|
while (p) {
|
|
4724
4726
|
if (parent === p) return true;
|
|
4727
|
+
if (minLevel && p.__level === minLevel) return;
|
|
4725
4728
|
p = p.parent;
|
|
4726
4729
|
}
|
|
4727
4730
|
},
|
|
@@ -4738,6 +4741,9 @@ var LeaferUI = function(exports) {
|
|
|
4738
4741
|
onAnimate && onAnimate();
|
|
4739
4742
|
}
|
|
4740
4743
|
};
|
|
4744
|
+
function isTrackChanges(leafer) {
|
|
4745
|
+
return leafer && leafer.config.trackChanges;
|
|
4746
|
+
}
|
|
4741
4747
|
const L = LeafHelper;
|
|
4742
4748
|
const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$1, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange} = L;
|
|
4743
4749
|
function getTempLocal(t, worldPoint) {
|
|
@@ -4785,6 +4791,16 @@ var LeaferUI = function(exports) {
|
|
|
4785
4791
|
sort(a, b) {
|
|
4786
4792
|
return a.__.zIndex === b.__.zIndex ? a.__tempNumber - b.__tempNumber : a.__.zIndex - b.__.zIndex;
|
|
4787
4793
|
},
|
|
4794
|
+
zIndex(branch, child, index) {
|
|
4795
|
+
const {children: children} = branch, before = children[index - 1], after = children[index];
|
|
4796
|
+
if (before && after) {
|
|
4797
|
+
if (child.zIndex < before.zIndex || child.zIndex > after.zIndex) child.zIndex = (before.zIndex + after.zIndex) / 2;
|
|
4798
|
+
} else if (before) {
|
|
4799
|
+
if (child.zIndex < before.zIndex) child.zIndex = before.zIndex + 1;
|
|
4800
|
+
} else if (after) {
|
|
4801
|
+
if (child.zIndex > after.zIndex) child.zIndex = after.zIndex - 1;
|
|
4802
|
+
}
|
|
4803
|
+
},
|
|
4788
4804
|
pushAllChildBranch(branch, leafList) {
|
|
4789
4805
|
branch.__tempNumber = 1;
|
|
4790
4806
|
if (branch.__.__childBranchNumber) {
|
|
@@ -5669,7 +5685,7 @@ var LeaferUI = function(exports) {
|
|
|
5669
5685
|
},
|
|
5670
5686
|
emitPropertyEvent(type, name, oldValue, newValue) {
|
|
5671
5687
|
const {leafer: leafer} = this;
|
|
5672
|
-
if (leafer
|
|
5688
|
+
if (isTrackChanges(leafer) || leafer.zoomLayer === this) {
|
|
5673
5689
|
const event = new PropertyEvent(type, this, name, oldValue, newValue);
|
|
5674
5690
|
this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
|
|
5675
5691
|
leafer.emitEvent(event);
|
|
@@ -6105,7 +6121,6 @@ var LeaferUI = function(exports) {
|
|
|
6105
6121
|
}
|
|
6106
6122
|
}
|
|
6107
6123
|
__bindFrame(frame) {
|
|
6108
|
-
if (this.isFrame && frame !== null) frame = this;
|
|
6109
6124
|
this.frame = frame;
|
|
6110
6125
|
if (this.isBranch) {
|
|
6111
6126
|
const {children: children} = this;
|
|
@@ -6410,14 +6425,17 @@ var LeaferUI = function(exports) {
|
|
|
6410
6425
|
}
|
|
6411
6426
|
if (child.parent) child.parent.remove(child);
|
|
6412
6427
|
child.parent = this;
|
|
6413
|
-
noIndex
|
|
6428
|
+
if (noIndex) this.children.push(child); else {
|
|
6429
|
+
BranchHelper.zIndex(this, child, index);
|
|
6430
|
+
this.children.splice(index, 0, child);
|
|
6431
|
+
}
|
|
6414
6432
|
if (child.isBranch) this.__.__childBranchNumber = (this.__.__childBranchNumber || 0) + 1;
|
|
6415
6433
|
const childLayout = child.__layout;
|
|
6416
6434
|
childLayout.boxChanged || childLayout.boxChange();
|
|
6417
6435
|
childLayout.matrixChanged || childLayout.matrixChange();
|
|
6418
6436
|
if (child.__parentChange) child.__parentChange.forEach(item => item(this, child));
|
|
6419
6437
|
if (child.__bubbleMap) child.__emitLifeEvent(ChildEvent.ADD);
|
|
6420
|
-
if (this.
|
|
6438
|
+
if (this.frame) child.__bindFrame(this.frame);
|
|
6421
6439
|
if (this.leafer) {
|
|
6422
6440
|
child.__bindLeafer(this.leafer);
|
|
6423
6441
|
if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
|
|
@@ -6477,11 +6495,11 @@ var LeaferUI = function(exports) {
|
|
|
6477
6495
|
if (this.leafer.hitCanvasManager) this.leafer.hitCanvasManager.clear();
|
|
6478
6496
|
}
|
|
6479
6497
|
}
|
|
6480
|
-
if (
|
|
6498
|
+
if (child.frame && !child.isFrame) child.__bindFrame(null);
|
|
6481
6499
|
}
|
|
6482
6500
|
__emitChildEvent(type, child) {
|
|
6483
6501
|
const {leafer: leafer} = this;
|
|
6484
|
-
if (leafer
|
|
6502
|
+
if (isTrackChanges(leafer) || leafer.zoomLayer === this) {
|
|
6485
6503
|
const event = new ChildEvent(type, child, this);
|
|
6486
6504
|
if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
|
|
6487
6505
|
leafer.emitEvent(event);
|
|
@@ -6634,7 +6652,12 @@ var LeaferUI = function(exports) {
|
|
|
6634
6652
|
this.levelMap = null;
|
|
6635
6653
|
}
|
|
6636
6654
|
}
|
|
6637
|
-
const version = "2.
|
|
6655
|
+
const version = "2.3.0";
|
|
6656
|
+
if (typeof globalThis !== "undefined") {
|
|
6657
|
+
const globalLeafer = globalThis.Leafer || (globalThis.Leafer = {});
|
|
6658
|
+
globalLeafer.version = version;
|
|
6659
|
+
globalLeafer.Plugin = Plugin;
|
|
6660
|
+
}
|
|
6638
6661
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
6639
6662
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6640
6663
|
set zIndex(zIndex) {
|
|
@@ -7742,6 +7765,16 @@ var LeaferUI = function(exports) {
|
|
|
7742
7765
|
});
|
|
7743
7766
|
};
|
|
7744
7767
|
}
|
|
7768
|
+
function frameType() {
|
|
7769
|
+
return (target, key) => {
|
|
7770
|
+
defineKey(target, key, {
|
|
7771
|
+
set(_value) {},
|
|
7772
|
+
get() {
|
|
7773
|
+
return this;
|
|
7774
|
+
}
|
|
7775
|
+
});
|
|
7776
|
+
};
|
|
7777
|
+
}
|
|
7745
7778
|
function createAttr(defaultValue) {
|
|
7746
7779
|
return (target, key) => {
|
|
7747
7780
|
defineKey(target, key, createDescriptor(key, defaultValue));
|
|
@@ -8994,6 +9027,7 @@ var LeaferUI = function(exports) {
|
|
|
8994
9027
|
return true;
|
|
8995
9028
|
}
|
|
8996
9029
|
};
|
|
9030
|
+
__decorate([ frameType() ], exports.Frame.prototype, "frame", void 0);
|
|
8997
9031
|
__decorate([ dataProcessor(FrameData) ], exports.Frame.prototype, "__", void 0);
|
|
8998
9032
|
__decorate([ surfaceType("#FFFFFF") ], exports.Frame.prototype, "fill", void 0);
|
|
8999
9033
|
__decorate([ affectRenderBoundsType("hide") ], exports.Frame.prototype, "overflow", void 0);
|
|
@@ -12868,6 +12902,7 @@ var LeaferUI = function(exports) {
|
|
|
12868
12902
|
exports.emptyData = emptyData;
|
|
12869
12903
|
exports.eraserType = eraserType;
|
|
12870
12904
|
exports.extraPropertyEventMap = extraPropertyEventMap;
|
|
12905
|
+
exports.frameType = frameType;
|
|
12871
12906
|
exports.getBoundsData = getBoundsData;
|
|
12872
12907
|
exports.getDescriptor = getDescriptor;
|
|
12873
12908
|
exports.getMatrixData = getMatrixData;
|
|
@@ -12881,6 +12916,7 @@ var LeaferUI = function(exports) {
|
|
|
12881
12916
|
exports.isNumber = isNumber;
|
|
12882
12917
|
exports.isObject = isObject;
|
|
12883
12918
|
exports.isString = isString;
|
|
12919
|
+
exports.isTrackChanges = isTrackChanges;
|
|
12884
12920
|
exports.isUndefined = isUndefined;
|
|
12885
12921
|
exports.layoutProcessor = layoutProcessor;
|
|
12886
12922
|
exports.leaferTransformAttrMap = leaferTransformAttrMap;
|