|
|
|
@ -3,6 +3,7 @@
|
|
|
|
|
<form v-if="editing" class="edit">
|
|
|
|
|
<textarea v-model="style"></textarea>
|
|
|
|
|
<button @click="edit">Confirm</button>
|
|
|
|
|
<button @click.prevent="remove"> X </button>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -26,7 +27,7 @@
|
|
|
|
|
|
|
|
|
|
import {ref, computed, onMounted} from 'vue'
|
|
|
|
|
|
|
|
|
|
let style = ref("color: white; stroke-width: 4px;")
|
|
|
|
|
let style = ref("color: white; fill: white; stroke-width: 4px;")
|
|
|
|
|
const editing = ref(false)
|
|
|
|
|
const currentIndex = ref(0)
|
|
|
|
|
|
|
|
|
@ -44,6 +45,11 @@ const select = (p, index) => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const remove = () => {
|
|
|
|
|
paths.value.splice(currentIndex.value, 1)
|
|
|
|
|
editing.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const container = ref(null)
|
|
|
|
|
const paths = ref([])
|
|
|
|
|
let rect = null
|
|
|
|
@ -158,8 +164,7 @@ const stopDrawing = (e) => {
|
|
|
|
|
if (!path) return
|
|
|
|
|
path = null
|
|
|
|
|
strPath = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paths.value[paths.value.length-1].style += " fill: white;"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -216,6 +221,10 @@ path {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.edit button + button {
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.edit button:hover {
|
|
|
|
|
background-color: white;
|
|
|
|
|
color: black;
|
|
|
|
|