Community
Participate
Working Groups
For some reason our editor allows a zoom range of 5% to 400%. This might be a little broad, but changing from 5% to 400% takes 32 seconds to animate. The application stops responding in many cases until the end of the 32 seconds. The problematic code seems to be: private AnimationModel calculateAnimationModel(double zoom) { double dmod = zoom / getZoom(); int steps = (int)Math.round(dmod > 0 ? dmod : 1/dmod); int duration = Math.max(DURATION_INCREMENT, steps * DURATION_INCREMENT); Animations should never take longer than 250 milliseconds. In the above code, 0 should probably be 1. Also, I would consider the following change: double dmod = Math.sqrt(zoom/getZoom());
I think 250 milli is may be too short for large context changes. But definitely 32 seconds is unacceptable...
sqrting the ratio is definitely better, but I think it still takes quite some time. In an ideal editor environment, I believe animations that take >1 seconds can become annoying especially if the corresponding feature has to be used frequently. How about: double dmod = Math.pow(zoom / getZoom(),(double)1/8);
Created attachment 43003 [details] Patch that fixes the large number of steps in animating zoom change.
patch committed for 1.0.100
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug