Add corner markers to editor resizer area
This commit is contained in:
parent
13cfb9ff14
commit
3b8fc807f7
@ -8,28 +8,24 @@
|
|||||||
@mousedown="(event) => handleMouseDown('offset', event)"
|
@mousedown="(event) => handleMouseDown('offset', event)"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="uw-clickable tl"
|
class="uw-clickable corner tl"
|
||||||
@mousedown.stop="(event) => handleMouseDown('tl', event)"
|
@mousedown.stop="(event) => handleMouseDown('tl', event)"
|
||||||
>
|
>
|
||||||
XX
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="uw-clickable tr"
|
class="uw-clickable corner tr"
|
||||||
@mousedown.stop="(event) => handleMouseDown('tr', event)"
|
@mousedown.stop="(event) => handleMouseDown('tr', event)"
|
||||||
>
|
>
|
||||||
XX
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="uw-clickable bl"
|
class="uw-clickable corner bl"
|
||||||
@mousedown.stop="(event) => handleMouseDown('bl', event)"
|
@mousedown.stop="(event) => handleMouseDown('bl', event)"
|
||||||
>
|
>
|
||||||
XX
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="uw-clickable br"
|
class="uw-clickable corner br"
|
||||||
@mousedown.stop="(event) => handleMouseDown('br', event)"
|
@mousedown.stop="(event) => handleMouseDown('br', event)"
|
||||||
>
|
>
|
||||||
XX
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,6 +54,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
document.addEventListener("mouseup", this.handleMouseUp);
|
document.addEventListener("mouseup", this.handleMouseUp);
|
||||||
document.addEventListener("mousemove", this.handleMouseMove);
|
document.addEventListener("mousemove", this.handleMouseMove);
|
||||||
|
updateTriggerZones();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateTriggerZones() {
|
updateTriggerZones() {
|
||||||
@ -169,6 +166,8 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.active-trigger-area {
|
.active-trigger-area {
|
||||||
background-image: url('/res/img/grid_512.webp');
|
background-image: url('/res/img/grid_512.webp');
|
||||||
|
background-position: center;
|
||||||
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trigger-zone-editor {
|
.trigger-zone-editor {
|
||||||
@ -176,8 +175,14 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
> * {
|
> .corner {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
background-color: #000;
|
||||||
|
background-image: url('/res/img/corner-marker_64.webp');
|
||||||
|
background-size: cover;
|
||||||
|
|
||||||
}
|
}
|
||||||
.tr, .tl {
|
.tr, .tl {
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -191,6 +196,15 @@ export default {
|
|||||||
.tr, .br {
|
.tr, .br {
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
.br {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
.bl {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
.tl {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
BIN
src/res/img/corner-marker_64.webp
Normal file
BIN
src/res/img/corner-marker_64.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Loading…
Reference in New Issue
Block a user