leafer-ui
leafer-ui copied to clipboard
指定findList后,pick拾取的不是最顶层元素
import { Leafer, Rect } from 'leafer-ui'
const leafer = new Leafer({ view: window })
const rect1 = new Rect({ id: 'rect1', fill: '#32cd79', x: 0, y: 0, width: 100, height: 100, zIndex: 10, })
const rect2 = new Rect({ id: 'rect2', fill: 'red', x: 25, y: 25, width: 50,height: 50, zIndex: 15, })
leafer.add(rect1)
leafer.add(rect2)
console.log(leafer.pick({ x: 50, y: 50 }, { findList: [rect1, rect2] }))
上面代码指定findList参数后拾取的是rect1,不指定findList拾取的是rect2,期望是拾取最顶层的rect2
收到,谢谢反馈~