[debug] removed excess debug statement in AbstractScaleFigure.scaleTo

This commit is contained in:
Daniel_M_Williams 2020-06-21 11:52:30 -04:00
parent e1389f674a
commit 5fea421dbf

View File

@ -85,30 +85,28 @@ public abstract class AbstractScaleFigure extends JPanel {
return originLocation_px; return originLocation_px;
} }
/** /**
* Set the scale level of the figure. A scale value of 1.0 is equivalent to 100 % scale. * Set the scale level of the figure. A scale value of 1.0 is equivalent to 100 % scale.
* Smaller scales display the subject smaller. * Smaller scales display the subject smaller.
* *
* If the figure would be smaller than the 'visibleBounds', then the figure is grown to match, * If the figure would be smaller than the 'visibleBounds', then the figure is grown to match,
* and the figures internal contents are centered according to the figure's origin. * and the figures internal contents are centered according to the figure's origin.
* *
* @param newScaleRequest the scale level * @param newScaleRequest the scale level
* @param visibleBounds the visible bounds upon the Figure * @param visibleBounds the visible bounds upon the Figure
*/ */
public void scaleTo(final double newScaleRequest, final Dimension visibleBounds) { public void scaleTo(final double newScaleRequest, final Dimension visibleBounds) {
if (MathUtil.equals(this.userScale, newScaleRequest, 0.01)){ if (MathUtil.equals(this.userScale, newScaleRequest, 0.01)){
return;} return;}
if (Double.isInfinite(newScaleRequest) || Double.isNaN(newScaleRequest)) { if (Double.isInfinite(newScaleRequest) || Double.isNaN(newScaleRequest)) {
return;} return;}
log.warn(String.format("scaling Request from %g => %g @%s\n", this.userScale, newScaleRequest, this.getClass().getSimpleName()), new Throwable()); this.userScale = MathUtil.clamp( newScaleRequest, MINIMUM_ZOOM, MAXIMUM_ZOOM);
this.scale = baseScale * userScale;
this.userScale = MathUtil.clamp( newScaleRequest, MINIMUM_ZOOM, MAXIMUM_ZOOM);
this.scale = baseScale * userScale; this.visibleBounds_px = visibleBounds;
this.visibleBounds_px = visibleBounds; this.fireChangeEvent();
this.fireChangeEvent();
} }
/** /**