zrender icon indicating copy to clipboard operation
zrender copied to clipboard

怎么避免拖动元素 移出画布

Open bilimumu1576 opened this issue 1 year ago • 1 comments

1.能否给个判定出界的方案 阻止移动可以

bilimumu1576 avatar Jan 24 '24 03:01 bilimumu1576

在drag事件中判断是否超出边界,超出时主动触发mouseup事件,中断鼠标的拖拽。

e.target.__zr.handler.dispatchToElement({target: e.target}, 'mouseup', e.event)

shyser avatar Mar 26 '24 08:03 shyser