image/zoom: Improve tracing messages
This commit is contained in:
parent
7151cf5d1d
commit
73c921b042
1 changed files with 9 additions and 0 deletions
|
|
@ -212,8 +212,11 @@ impl imp::LpImage {
|
||||||
) {
|
) {
|
||||||
let obj = self.obj().to_owned();
|
let obj = self.obj().to_owned();
|
||||||
|
|
||||||
|
tracing::trace!(zoom, animated, snap_best_fit, force_cursor_center, fit_mode=?obj.fit_mode(), "Zoom instruction");
|
||||||
|
|
||||||
let max_zoom = self.max_zoom();
|
let max_zoom = self.max_zoom();
|
||||||
if zoom >= max_zoom {
|
if zoom >= max_zoom {
|
||||||
|
tracing::trace!(zoom, max_zoom, "Zoom reached maximum zoom level");
|
||||||
zoom = max_zoom;
|
zoom = max_zoom;
|
||||||
obj.set_is_max_zoom(true);
|
obj.set_is_max_zoom(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -237,9 +240,15 @@ impl imp::LpImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
if zoom <= extended_best_fit_threshold && obj.fit_mode() != FitMode::ExactVolatile {
|
if zoom <= extended_best_fit_threshold && obj.fit_mode() != FitMode::ExactVolatile {
|
||||||
|
tracing::trace!(
|
||||||
|
zoom,
|
||||||
|
extended_best_fit_threshold,
|
||||||
|
"Zoom too small for best fit, locking to best-fit"
|
||||||
|
);
|
||||||
zoom = self.zoom_level_best_fit();
|
zoom = self.zoom_level_best_fit();
|
||||||
obj.set_best_fit(true);
|
obj.set_best_fit(true);
|
||||||
} else {
|
} else {
|
||||||
|
tracing::trace!(zoom, extended_best_fit_threshold, "Not locking to best-fit");
|
||||||
obj.set_best_fit(false);
|
obj.set_best_fit(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue