- From: Vincent Scheib <notifications@github.com>
- Date: Fri, 20 Jan 2017 11:31:27 -0800
- To: w3c/pointerlock <pointerlock@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/pointerlock/issues/16/274158909@github.com>
I agree that a pure horizontal movement across an iframe is not certain to have sum(movementX) == iframe width. The concern would be if the movement values were computed from the last pointer position over the iframe, instead of the last one received by the OS. Thanks for the clarification RByers, I think we're on the same page, but let me diagram this out so we're really sure: Here's a diagram of a mouse moving from left to right across a browser window two times. The mouse events received by the OS are denoted by alphabet letters a-z. ``` +------------------------------------------------------+ | Browser Window Title | +------------------------------------------------------+ | | | an iframe in the web contents: | | ......................... | | : : | a | b : c d : e f | g | : : | h t | u : v w : x y | z s | : : | i | :.......................: | r +------------------------------------------------------+ j q k p o n m l ``` Mouse events a, g-t, and z are received by the OS from the pointing device, but NOT by the browser. The browser will not be able to use them to compute deltas for movementX/Y. Event b must have movementX/Y == 0, because we are unable to compute the delta from a to b. Event u must have movementX/Y == 0, avoiding the easy to implement error of measuring the delta from f to u (that happens if we just compute delta from last mouse data received by the browser). Event c would ideally have movementX/Y set by the delta from b to c. But, I'm willing to also spec this as == 0 if there is some implementation issue that arrises. Ditto for events e, v, x. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/pointerlock/issues/16#issuecomment-274158909
Received on Friday, 20 January 2017 19:32:26 UTC