如果您:
- Mousedown左键↓
- Mousedown右键按钮↓
- MouseUp右键右键↑
拖动事件被 MouseUp右键,我不希望这种情况发生。
(仅希望在 MouseUp左键上发生这种情况,因为该事件是由 MLB 。)
- 我尝试过
> dextrest -default(),纸张上的stoppropagation()
窗口事件。
- 我已经尝试在MouseUp
tool.emit上发射Mousedown/Mousedrag(“ Mousedown”,tool.onmousedown);
不确定我是否对此做错了什么,但是它运行一次Mousedown函数停止,我认为它不会将事件数据保留在第一个Mousedown中。
有什么方法可以防止这种情况,甚至可以防止纸张在需要时完全访问正确的按钮?
我知道这已经有一段时间了: https://github.com /paperjs/paper.js/issues/1355
然而,有一个修复程序可以访问1,2,3 ..按钮(事件为任何).event.button
,
没有修复程序可以防止将拖动设置为> false
。
PS感谢任何帮助!
If you:
- mousedown left button ↓
- mousedown right button ↓
- mouseup right button ↑
The drag event gets canceled by mouseup right button , I don't want that to happen.
(only want that to happen on mouseup left button , because the event was started by mlb.)
- I've tried
preventDefault(), stopPropagation()
on both paper and
window event.
- I've tried emitting mousedown/mousedrag on mouseup
tool.emit("mousedown", tool.onMouseDown);
not sure if I'm doing something wrong with it, but it runs the mousedown function once and stops, and I don't think it keeps event data from the first mousedown.
Is there any way to prevent this, maybe even preventing Paperjs from accessing the right button entirely if needed?
I know this has been kind and issue for a while now: https://github.com/paperjs/paper.js/issues/1355
yet there is a fix for accessing 1,2,3.. buttons (event as any).event.button
,
there is no fix for preventing the dragging to be set to false
.
P.S Appreciate for any help!
发布评论