diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 7b1144e0..665f91ee 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -89,7 +89,7 @@ (defn pan-to [screen entities x y scale-fn & [ease duration]] (let [ease (or ease tween/ease-in-out-quadratic) duration (or duration 3.0) - target-zoom (min 0.95 (max 0.75 (scale-fn [x y]))) + target-zoom (min 0.95 (max 0.75 (scale-fn [(max 0 (min 319 x)) (max 0 (min 240 y))]))) current-zoom (get-in entities [:cam :zoom] 1.0) ;; don't zoom if it's a subtle difference