拖動指令bug修改(4)

2021-08-05 21:31:53 字數 673 閱讀 1417

指令用到專案中後,測試提了乙個bug,在瀏覽器中input框,文字域等輸入框中游標聚焦有問題,經過排查,發現是用來過濾元素的draggable屬性的問題。換了個屬性名解決問題。

.directive('draggable', ['$document', function($document) );

//按下滑鼠左鍵

element.eq(index).find(".am-modal-hd").on('mousedown', function(event)

startx = event.pagex - x;

starty = event.pagey - y;

$document.on('mousemove', mousemove);

$document.on('mouseup', mouseup);

});//滑鼠移動

function mousemove(event) else if(y>maxheight+(9/10)*eleheight)

if(x<-maxwidth)else if(x>maxwidth)

element.eq(index).css();

}//鬆開滑鼠

function mouseup()

}});

}           

}])

4 經典定長指令 修改ERX

定長指的是 只要opcode確定,這條指令的長度就確定了,這就是定長 而不是 opcode 的長度就是指令的長度 要記住通用暫存器的順序,有利於理解硬編碼 0 eax 1 ecx 2 edx 3 ebx 4 esp 5 ebp 6 esi 7 edi 1 push pop 50 push eax 5...

vue指令實現拖動的高階寫法

不熟悉vue自定義指令看這裡 vue.directives 這裡是滑鼠超出基於盒子範圍之後再鬆開,會監聽不到 document.onmouseup e 這裡介紹一種比較方美觀,邏輯清晰的寫法,如下 vue.directive drag bind 改變函式內部 this 指向,讓 this 指向 el...

修改CS IP指令

實驗環境 visual stdio 2015 irvine庫 除錯視窗暫存器,可以看到暫存器變化 右鍵暫存器視窗 可以開啟 段和標誌位 外掛程式asmhighlighter語法高亮提示 書籍 組合語言第三版王爽編譯未通過 jmp 2ae3 3 執行後 cs 2ae3h,ip 0003h,cpu將從2...