leafer-ui icon indicating copy to clipboard operation
leafer-ui copied to clipboard

在较新 IOS 系统上的 safari 上使用 阴影会导致 outside 类型的边框绘制不正确

Open mozbia opened this issue 7 months ago • 9 comments

测试环境: IOS 18.2 safari ,会出现该问题 测试环境: IOS 16.2 safari ,没有该问题

代码:

` import { Box, App, version, Platform } from 'leafer-ui'

import '@leafer-in/editor' import '@leafer-in/viewport' import '@leafer-in/flow' import '@leafer-in/export' import '@leafer-in/resize' import '@leafer-in/state' import '@leafer-in/text-editor'

console.log(version) window.onload = () => { const leafer = new App({ view: window, usePartRender: true,

// zoom: {
//   disabled: true,
// },
// move: {
//   disabled: true,
// },

pointer: {
  preventDefault: false,
  preventDefaultMenu: true,
},
touch: {
  preventDefault: true,
},

tree: { type: 'design' },

})

const image = new Box({ width: 150, height: 100, x: 10, y: 10, fill: 'red', overflow: 'hide', stroke: '#000', strokeWidth: 6, strokeAlign: 'outside', shadow: { x: 0, y: 25.86263020833334, blur: 20, box: true, spread: -20, color: '#00000099', }, })

const image1 = new Box({ width: 200, height: 200, x: 10, y: 10, fill: 'blue', overflow: 'hide', })

image1.add(image)

leafer.tree.addMany(image1) }

`

尝试拖动图形位置问题现象会有所不同。

mozbia avatar May 20 '25 02:05 mozbia

使用 leafer 最新 1.6.2 版本

mozbia avatar May 20 '25 02:05 mozbia

收到,谢谢反馈

leaferjs avatar May 20 '25 06:05 leaferjs

在iOS 18.5上测试不出来,我估计是没判断到苹果浏览器内核导致的。

强制设置一下 Platform.fullImageShadow = true 试试

leaferjs avatar May 23 '25 06:05 leaferjs

试了, 设置Platform.fullImageShadow = true 也不行. 那就奇怪了,给我反馈的用户就是 ios 18.5.
大佬有没有拖动缩放页面试试?,要拖动拖动页面的才会出现的

mozbia avatar May 23 '25 07:05 mozbia

https://github.com/user-attachments/assets/6653ee99-6b88-4384-8106-02bf6f8be159

mozbia avatar May 23 '25 07:05 mozbia

试出来了,要缩放到比较大才能看出来,之前我加了个拖拽属性没试出来

leaferjs avatar May 23 '25 07:05 leaferjs

好,能传视频了,之前我怎么一直传不了😂。 幸苦大佬

mozbia avatar May 23 '25 07:05 mozbia

已修复,等待新版本发布~

leaferjs avatar May 24 '25 09:05 leaferjs

辛苦大佬,刚打开 github 就看到修复了 感动🥹

mozbia avatar May 24 '25 09:05 mozbia

https://github.com/user-attachments/assets/4bee72ae-2da9-447d-b1f4-300e751fb35e

`import { Box, App, version, Platform } from 'leafer-ui'

import '@leafer-in/editor' import '@leafer-in/viewport' import '@leafer-in/flow' import '@leafer-in/export' import '@leafer-in/resize' import '@leafer-in/state' import '@leafer-in/text-editor'

console.log(version) window.onload = () => { const leafer = new App({ view: window, usePartRender: true,

// zoom: {
//   disabled: true,
// },
// move: {
//   disabled: true,
// },

pointer: {
  preventDefault: false,
  preventDefaultMenu: true,
},
touch: {
  preventDefault: true,
},

tree: { type: 'design' },

})

const image = new Box({ width: 150, height: 100, x: 10, y: 10, fill: '#ffffff', overflow: 'hide', strokeWidth: 0, stroke: '#000', strokeAlign: 'outside', shadow: { x: 10, y: 10, blur: 20, box: true, color: '#000', }, })

const image1 = new Box({ width: 190, height: 120, x: 10, y: 10, fill: 'blue', overflow: 'hide', })

image1.add(image)

leafer.tree.addMany(image1)

} `

大佬 box=true, 还会存在这个问题哦

mozbia avatar Jun 11 '25 04:06 mozbia

我修复一下

leaferjs avatar Jun 11 '25 13:06 leaferjs

已经修复,等下个版本发布~

leaferjs avatar Jun 12 '25 01:06 leaferjs