Skip to content

Commit

Permalink
feat: enlarge SelectedBox move valid area (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
devlzl authored Jan 16, 2024
1 parent e9ca778 commit 8979075
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/UserInterface/Slide/components/SelectedBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ selectionManager.events.update.on(() => {

<template>
<div
class="selected-box absolute border border-secondary-border"
class="selected-box absolute"
v-if="showSelectedBox"
:style="{
left: `${selectedBoxRect.x}px`,
Expand All @@ -66,10 +66,18 @@ selectionManager.events.update.on(() => {
:strokeWidth="2"
/>

<div class="move-handle" :style="{ top: '-7px', width: '100%', height: '2px' }"></div>
<div class="move-handle" :style="{ bottom: '-7px', width: '100%', height: '2px' }"></div>
<div class="move-handle" :style="{ left: '-7px', width: '2px', height: '100%' }"></div>
<div class="move-handle" :style="{ right: '-7px', width: '2px', height: '100%' }"></div>
<div class="move-handle" :style="{ top: '-12px', width: '100%', height: '12px' }">
<div class="absolute w-full h-[2px] top-[5px] bg-[gray]"></div>
</div>
<div class="move-handle" :style="{ bottom: '-12px', width: '100%', height: '12px' }">
<div class="absolute w-full h-[2px] bottom-[5px] bg-[gray]"></div>
</div>
<div class="move-handle" :style="{ left: '-12px', width: '12px', height: '100%' }">
<div class="absolute h-full w-[2px] left-[5px] bg-[gray]"></div>
</div>
<div class="move-handle" :style="{ right: '-12px', width: '12px', height: '100%' }">
<div class="absolute h-full w-[2px] right-[5px] bg-[gray]"></div>
</div>

<div
class="size-handle top cursor-ns-resize"
Expand Down Expand Up @@ -104,7 +112,6 @@ selectionManager.events.update.on(() => {
.move-handle {
position: absolute;
z-index: 1;
background-color: gray;
cursor: move;
}
Expand Down

0 comments on commit 8979075

Please sign in to comment.