diff --git a/tl/src/tl/events.cljs b/tl/src/tl/events.cljs index 1390cea..9a63411 100644 --- a/tl/src/tl/events.cljs +++ b/tl/src/tl/events.cljs @@ -90,7 +90,9 @@ (rf/reg-event-db ::open-draft (fn [db _] (-> db - (assoc-in [:scene :groups (keyword (gensym "ann-"))] + ;; uuid, not gensym: gensym's counter resets each page load, so a + ;; fresh annotation would reuse a prior gid and clobber it on merge. + (assoc-in [:scene :groups (keyword (str "ann-" (random-uuid)))] {:type :annotation :parent (peek (get-in db [:view :stack])) :draft :new :name "" :color "#4e8fc2" :marks []}) (assoc-in [:view :pt] :new))))