[英]How to contain the drag n drop of a canvas inside another canvas?
我的意思是內層畫布無法移動到外層畫布之外。 我需要創建一個儀表+進度欄,如圖像。 參見下圖。
根據下圖,電表控件應僅在該限制區域內向上或向下移動。 我相信可以使用HTML5中的拖放操作來完成此操作嗎?
請嘗試以下操作:
$(yourMeter).draggable({
axis: 'y',
containment: $(yourProgressBar)});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.