diff --git a/deps.edn b/deps.edn index af58072..9696e99 100644 --- a/deps.edn +++ b/deps.edn @@ -7,7 +7,7 @@ :extra-deps {org.clojure/clojure {:mvn/version "1.11.1"} org.clojure/clojurescript {:mvn/version "1.11.60"} - org.mentat/clerk-utils {:mvn/version "0.5.1"} + org.mentat/clerk-utils {:mvn/version "0.6.0"} io.github.nextjournal/clerk {:git/sha "1f6c5331418aaf9c5a4335fc2e6e95f07dc3af6b"} diff --git a/src/mafs/core.cljs b/src/mafs/core.cljs index ffde13f..6226290 100644 --- a/src/mafs/core.cljs +++ b/src/mafs/core.cljs @@ -52,11 +52,21 @@ - `:pan`: If true (default), enable panning with the mouse and keyboard. - - `:view-box`: If true, enable zooming with the mouse and keyboard. + - `:zoom`: If true, enable zooming with the mouse and keyboard. can also be a map with keys `:min` (in range `(0, 1]`) and `:max` (in range `[1, ∞)`). + - `:view-box`: (optional) A way to declare the \"area of interest\" of your + visualizations. Mafs will center and zoom to this area. Supply `nil` or a map + with the following key-value pairs: + + - `:x`: (optional) a 2-vector of `[ ]` + + - `:y`: (optional) a 2-vector of `[ ]` + + - `:padding`: (optional) number of pixels to pad. + - `:preserve-aspect-ratio`: boolean or \"contain\" (default). Whether to squish the graph to fill the Mafs viewport or to preserve the aspect ratio of the coordinate space.