From b37ee0fcac502d5f8577e69f3352f06837336981 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 24 Nov 2020 08:35:01 +0100 Subject: [PATCH] :sparkles: Adds comments cursor --- frontend/resources/images/cursors/comments.svg | 4 ++++ frontend/src/app/main/ui/cursors.cljs | 2 +- frontend/src/app/main/ui/workspace/viewport.cljs | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 frontend/resources/images/cursors/comments.svg diff --git a/frontend/resources/images/cursors/comments.svg b/frontend/resources/images/cursors/comments.svg new file mode 100644 index 000000000..4683f3a2e --- /dev/null +++ b/frontend/resources/images/cursors/comments.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/app/main/ui/cursors.cljs b/frontend/src/app/main/ui/cursors.cljs index bc60deba4..24028c30f 100644 --- a/frontend/src/app/main/ui/cursors.cljs +++ b/frontend/src/app/main/ui/cursors.cljs @@ -35,6 +35,7 @@ (def pointer-node (cursor-ref :pointer-node 0 0 10 32)) (def pointer-move (cursor-ref :pointer-move 0 0 10 42)) (def pen-node (cursor-ref :pen-node 0 0 10 36)) +(def comments (cursor-ref :comments 0 2 20)) (mf/defc debug-preview {::mf/wrap-props false} @@ -58,4 +59,3 @@ [:span {:style {:white-space "nowrap" :margin-right "1rem"}} (pr-str key)]])))])) - diff --git a/frontend/src/app/main/ui/workspace/viewport.cljs b/frontend/src/app/main/ui/workspace/viewport.cljs index fc07ba6db..c469e240b 100644 --- a/frontend/src/app/main/ui/workspace/viewport.cljs +++ b/frontend/src/app/main/ui/workspace/viewport.cljs @@ -536,12 +536,12 @@ :class (when drawing-tool "drawing") :style {:cursor (cond panning cur/hand - (= drawing-tool :comments) cur/hand + (= drawing-tool :comments) cur/comments (= drawing-tool :frame) cur/create-artboard (= drawing-tool :rect) cur/create-rectangle (= drawing-tool :circle) cur/create-ellipse (or (= drawing-tool :path) drawing-path?) cur/pen - (= drawing-tool :curve)cur/pencil + (= drawing-tool :curve) cur/pencil drawing-tool cur/create-shape :else cur/pointer-inner) :background-color (get options :background "#E8E9EA")}