Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 449870

Summary: Ensure proper pivot point is chosen when zooming
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact: Alexander Nyßen <nyssen>
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M5   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2014-11-04 01:52:16 EST
Up to now, zooming is performed relative to the top-left corner of the viewport. We should ensure that a more adequate pivot point is chosen (e.g. the center, or the center of the current selection).
Comment 1 Matthias Wienand CLA 2014-12-19 12:34:13 EST
Zomming is now performed relative to the mouse pointer location. The code is published on the master branch. Resolving as fixed.
Comment 2 Alexander Nyßen CLA 2015-02-02 13:37:55 EST
Reopen, because no proper pivot-point is selected when using pinch/spread for zooming. We need to adjust this as well.
Comment 3 Alexander Nyßen CLA 2015-02-03 00:19:39 EST
I applied the following changes:
- Changed signature of FXPinchSpreadPolicy to no longer pass in event values (the event itself should be sufficient)
- Make sure FXZoomOnPinchSpreadPolicy and FXZoomOnScrollPolicy use the same mechanism for zooming, by introduc
ing an FXChangeViewportPolicy that performs the actual zoom (based on a FXChangeViewportOperation).

Zooming for pinch/spread works as expected now. Matthias, could you please validate that zoom on scroll is still functional for you as well?
Comment 4 Alexander Nyßen CLA 2015-02-03 11:24:41 EST
With the workaround implemented in bug #430940, zooming with mouse wheel does not work on the Mac (because the non-synthesized mouse wheel events do not seem to be differentiable from the synthesized). We should investigate this as well, before resolving this.
Comment 5 Alexander Nyßen CLA 2015-02-03 15:57:58 EST
Re-opened #430940 and properly fixed it on Mac. I think we may resolve this here independently. 

What I would like to adjust (before closing as fixed) is the different stepping for gesture based zoom (5) and mouse wheel based (40) one. I think zooming should behave comparable fast in both cases, so we should compensate that.
Comment 6 Alexander Nyßen CLA 2015-02-05 12:18:38 EST
Opened #459243 to keep track of the different stepping when zooming. As #430940 keeps track of the underlying event handling issues, resolving this one as fixed in 3.10.0M5.