Skip to content

Commit

Permalink
Increased default zoom factor and parameterized it in one location. C…
Browse files Browse the repository at this point in the history
…ommitted by Ben Weintraub.
  • Loading branch information
iowaguy committed Aug 12, 2016
1 parent 0cc35a0 commit 0e3ff67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cljs/jackal/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
(def pixel-offset-x (/ screen-width 2))
(def pixel-offset-y (/ screen-height 2))
(def canvas-name "fractal-canvas")
(def zoom-factor 2)
(def zoom-factor 4)

(defn offset-pixel-coordinate-x
[x]
Expand Down Expand Up @@ -81,8 +81,8 @@
(assoc :ymax new-max-y)
(assoc :scale new-scale)
(update :step #(/ 1 new-scale))
(update :x-offset #(- pixel-offset-x (* 2 (- (:x event) %))))
(update :y-offset #(- pixel-offset-y (* 2 (- (:y event) %)))))))
(update :x-offset #(- pixel-offset-x (* zoom-factor (- (:x event) %))))
(update :y-offset #(- pixel-offset-y (* zoom-factor (- (:y event) %)))))))

(defn draw
[state]
Expand Down

0 comments on commit 0e3ff67

Please sign in to comment.