如何在平移/滚动时禁用手势或指针事件? [英] How to disable gesture or pointer events while panning/scrolling ?
问题描述
您好
我创建了一个数据网格,可以像excel表一样在x和y轴上滚动。
I have created one datagrid which scroll in both x and y axis like an excel sheet.
I在每一行网格上绑定指针事件。但是这些指针事件在平移/滚动时被触发。
I have bind pointers events on each row of grid. But those pointers events are got fired while panning/scrolling.
如何防止在滚动时触发这些事件。
How can i prevent firing those events while scrolling.
" Scrolling"使用"溢出"来实现属性。
"Scrolling" is implemented using "overflow" property.
有什么像preventDefault()我曾经在jQuery中用来阻止冒泡事件..
is there anything like preventDefault() which i used to use in jQuery to stop bubbling events..
谢谢
-Sachin
推荐答案
您可以捕获指针。 你仍然可以使用jQuery。
You can capture the pointer. You can still use jQuery as well.
在这个例子中,指针是在SVG文档中捕获的。 您可以在设计中执行类似的操作:
http:// code .msdn.microsoft.com / windowsapps / Manipulations-and-gestures-26918bb3
In this example the pointer is captured inside of an SVG doc. You could do something similar in your design: http://code.msdn.microsoft.com/windowsapps/Manipulations-and-gestures-26918bb3
-Jeff
这篇关于如何在平移/滚动时禁用手势或指针事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!