Implemented tap vs hold drawing setting
This commit is contained in:
@ -73,7 +73,7 @@
|
||||
<div class="w-px bg-cyan"></div>
|
||||
|
||||
<label class="my-auto gap-0" for="checkbox">Continuous Drawing</label>
|
||||
<input type="checkbox" />
|
||||
<input @change="handleCheck" v-model="checkboxValue" type="checkbox"/>
|
||||
</div>
|
||||
|
||||
<div class="toolbar fixed bottom-0 right-0 m-3 rounded flex bg-gray solid border-solid border-2 border-gray-500 text-gray-300 p-1.5 px-3 h-10 space-x-2">
|
||||
@ -105,6 +105,8 @@ let selectEraserOpen = ref(false)
|
||||
let tileListShown = ref(false)
|
||||
let mapObjectListShown = ref(false)
|
||||
|
||||
let checkboxValue = ref(false)
|
||||
|
||||
defineExpose({ tileListShown, mapObjectListShown })
|
||||
|
||||
// drawMode
|
||||
@ -131,6 +133,10 @@ function setEraserMode() {
|
||||
selectEraserOpen.value = false
|
||||
}
|
||||
|
||||
function handleCheck() {
|
||||
mapEditor.setInputMode(checkboxValue.value ? 'hold' : 'tap')
|
||||
}
|
||||
|
||||
function handleModeClick(mode: string, type: 'pencil' | 'eraser') {
|
||||
setDrawMode(mode)
|
||||
type === 'pencil' ? setPencilMode() : setEraserMode()
|
||||
|
Reference in New Issue
Block a user