bug_x

导航

 

1、https://electronjs.org/docs/api/web-contents

2、通常用:

   monitorEvents(document.body, 'mouse')  检测正常的值:

  

 

For mouse events, the event object also have following properties:

x Integer (required)  // left值

y Integer (required)  // top值

button String - The button pressed, can be left, middle, right.

globalX Integer   //对应一处的width

globalY Integer   //对应一处的height

movementX Integer

movementY Integer

clickCount Integer

screenX 467   ==      globalX
screenY 301   ==      globalY
clientX 176 = pageX   x
clientY 206 = pageY   y

offsetX 46 == layerX
offsetY 26 == layerY

 

 

posted on 2018-08-27 11:46  bug_x  阅读(445)  评论(0编辑  收藏  举报