diff --git a/frontend/src/arthur/ui/timeline.cljs b/frontend/src/arthur/ui/timeline.cljs index 0d6450c..72eac76 100644 --- a/frontend/src/arthur/ui/timeline.cljs +++ b/frontend/src/arthur/ui/timeline.cljs @@ -540,12 +540,23 @@ [delta] (fn [db] (when-let [p (ui/span-path db)] [::ui/slide p delta :out true]))) +(defn- places-lane? + "Does the row at `path` in the open symbol place a lane? Holding a lane + longer is not lengthening a drawing, which is what = and − are on the bar for." + [db path] + (let [{document :clip st :store} (store/entry (:clip/current db)) + f (ui/editing-frame db document) + host (nest/inside document st (get-in db [:ui :open]) (pop path) f) + n (get-in document [:symbols (:sid host) :nodes (peek path)])] + (boolean (some->> (node/source n) (clip/symbol document) symbol/lane?)))) + (rf/reg-sub ::here ;; Which of the toolbar's commands mean something for the selection right now. (fn [db _] - {:lane? (some? (ui/lane-here db)) - :span? (some? (ui/span-path db))})) + (let [p (ui/span-path db)] + {:lane? (some? (ui/lane-here db)) + :span? (and (some? p) (not (places-lane? db p)))}))) ;; --------------------------------------------------------------------------- ;; the panes