Bug 1751510 Comment 15 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Razvan Cojocaru from comment #13)
> Should I set `dx` and `dy` there too? If so, where would I pull them from?

Very good point! Yes, we should. I would suggest the following:

 * When receiving the `PHASE_BEGIN` event, save the values of `x` and `y` in a field of `nsWindow` (e.g. `mLastTouchpadPinchBegin`). The `dx` and `dy` values here can be 0.
 * For `PHASE_UPDATE` and `PHASE_END` events, set their `x` and `y` to `mLastTouchpadPinchBegin`, and set their `dx` and `dy` to the difference `(pointInWindow - mLastTouchpadPinchBegin)`.

(In reply to Razvan Cojocaru from comment #14)
> (Also, if this helps anything - clarity? - you can assign this bug to me, I intend to see it through eventually. :))

Done -- thanks!
(In reply to Razvan Cojocaru from comment #13)
> Should I set `dx` and `dy` there too? If so, where would I pull them from?

Very good point! Yes, we should. I would suggest the following:

 * When receiving the `PHASE_BEGIN` event, save the value of `pointInWindow` in a field of `nsWindow` (e.g. `mLastTouchpadPinchBegin`). The `dx` and `dy` values here can be 0.
 * For `PHASE_UPDATE` and `PHASE_END` events, set their `x` and `y` to `mLastTouchpadPinchBegin`, and set their `dx` and `dy` to the difference `(pointInWindow - mLastTouchpadPinchBegin)`.

(In reply to Razvan Cojocaru from comment #14)
> (Also, if this helps anything - clarity? - you can assign this bug to me, I intend to see it through eventually. :))

Done -- thanks!
(In reply to Razvan Cojocaru from comment #13)
> Should I set `dx` and `dy` there too? If so, where would I pull them from?

Very good point! Yes, we should. I would suggest the following:

 * When receiving the `PHASE_BEGIN` event, save the value of `pointInWindow` in a new field of `nsWindow` (e.g. `mLastTouchpadPinchBegin`). The `dx` and `dy` values here can be 0.
 * For `PHASE_UPDATE` and `PHASE_END` events, set their `x` and `y` to `mLastTouchpadPinchBegin`, and set their `dx` and `dy` to the difference `(pointInWindow - mLastTouchpadPinchBegin)`.

(In reply to Razvan Cojocaru from comment #14)
> (Also, if this helps anything - clarity? - you can assign this bug to me, I intend to see it through eventually. :))

Done -- thanks!

Back to Bug 1751510 Comment 15