Mask一个问题
import { App, Rect,Group } from 'leafer-ui' import '@leafer-in/editor' import '@leafer-in/viewport'
const app = new App({ view: window, editor: {} }) const group = new Group({ x: 100, y: 100 }) const r1 = Rect.one({ editable: true, fill: '#FEB027', cornerRadius: [20, 0, 0, 20] }, 100, 100) const r2 = Rect.one({ editable: true, fill: '#FFE04B', mask: true, cornerRadius: [0, 20, 20, 0] }, 150, 100) const r3 = Rect.one({editable: true, fill: '#FF0000', cornerRadius: [0, 20, 20, 0] }, 190, 120) group.add([r1, r2,r3])
app.tree.add(group)
当我拖动r2时mask会失效 setTimeout(() => { r2.dropTo(group,0); },1000)
如何重新mask则下面图 setTimeout(() => { r2.dropTo(group,0); if (r2.mask) { r2.mask = false setTimeout(() => { r2.mask = true }, 50) } },1000)
当我设置有zIndex时,渲染后显示有问题
收到,谢谢反馈~