[英]Is there a way to get the position of the "ghost image" when dragging an element
我想知道是否有辦法獲得元素的拖動鬼圖像的位置。
設置如下:
<div id="test" v-on:dragstart="dragStart" v-on:drag="dragging" draggable="true" v-on:drop="drop" v-on:dragover="allowDrop"></div>
重影的位置將與指針/鼠標指針的位置相同。 由於您使用的是 jQuery,因此可以通過以下方式獲取這些坐標(位置):
$("body").mousemove(function(e) {
console.log('position of ghost image: ' + e.pageX + ', ' + e.pageY;
})
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.