🐛 Fix move scrollbar create a selection rectangle

This commit is contained in:
Eva Marco 2024-06-12 12:02:12 +02:00 committed by Alejandro Alonso
parent 09a671cffa
commit 232cfea709
7 changed files with 46 additions and 6 deletions

View file

@ -636,8 +636,8 @@
:objects base-objects
:modifiers modifiers
:shape frame
:view-only true}]))
:view-only true}]))]
[:g.scrollbar-wrapper {:clipPath "url(#clip-handlers)"}
[:& scroll-bars/viewport-scrollbars
{:objects base-objects
:zoom zoom

View file

@ -196,7 +196,8 @@
[:*
(when show-v-scroll?
[:g.v-scroll {:fill clr/black}
[:g.v-scroll {:fill clr/black
:data-testid "vertical-scrollbar"}
[:rect {:on-pointer-move #(on-pointer-move % :y)
:on-pointer-down #(on-pointer-down % :y)
:on-pointer-up on-pointer-up
@ -210,7 +211,8 @@
:style {:stroke "white"
:stroke-width (/ 0.15 zoom)}}]])
(when show-h-scroll?
[:g.h-scroll {:fill clr/black}
[:g.h-scroll {:fill clr/black
:data-testid "horizontal-scrollbar"}
[:rect {:on-pointer-move #(on-pointer-move % :x)
:on-pointer-down #(on-pointer-down % :x)
:on-pointer-up on-pointer-up

View file

@ -67,6 +67,7 @@
[:rect.selection-rect
{:x (:x data)
:y (:y data)
:data-testid "workspace-selection-rect"
:width (:width data)
:height (:height data)
:style {;; Primary with 0.1 opacity