- From: Masayuki Nakano <notifications@github.com>
- Date: Sat, 12 Nov 2016 23:59:16 -0800
- To: w3c/uievents <uievents@noreply.github.com>
- Message-ID: <w3c/uievents/issues/114@github.com>
When I work on reimplementing legacy mouse scroll event handlers to standardized wheel event handles, I thought that if there are WheelDelta.intDelta(X|Y|Z) or something, some web apps may handle wheel events easier. My proposal is, WheelEvent.intDelta(X|Y|Z) is set to an non-zero integer value when accumulated delta value is over 1 or less -1, sets the corresponding intDelta value to the integer and remove the value from accumulated delta value. For example, when a device causes scrolling 0.4 lines per event: 1. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.4) 2. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.8) 3. deltaY: 0.4, intDeltaY: 1 (accumulated deltaY: 0.2) when a device causes scrolling 1.5 lines per event: 1. deltaY: 1.5, intDeltaY: 1 (accumulated deltaY: 0.5) 2. deltaY: 1.5, intDeltaY: 2 (accumulated deltaY: 0.0) When user reverse the delta direction, accumulated delta should be recounted from 0: 1. deltaY: 0.4, intDeltaY: 0 (accumulated deltaY: 0.4) 2. deltaY: 0.8, intDeltaY: 0 (accumulated deltaY: 0.8) 3. deltaY: -0.4, intDeltaY: 0 (accumulated deltaY: -0.4) 4. deltaY: -0.4, intDeltaY: 0 (accumulated deltaY: -0.8) 5. deltaY: -0.4, intDeltaY: -1 (accumulated deltaY: -0.2) This may be useful if web apps implements listbox or treeview which scrolls per its item. -- 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/uievents/issues/114
Received on Sunday, 13 November 2016 07:59:49 UTC