option to change drawing direction
This commit is contained in:
@ -40,6 +40,16 @@
|
||||
@input="updateRefreshRate"
|
||||
>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label>Invert Drawing Direction
|
||||
<input
|
||||
type="checkbox"
|
||||
:checked="drawingDirection === 'x'"
|
||||
:value="drawingDirection"
|
||||
@input="updateDrawingDirection"
|
||||
>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</MenuRow>
|
||||
</template>
|
||||
@ -56,7 +66,8 @@ export default {
|
||||
...mapGetters({
|
||||
canvasWidth: 'getCanvasWidth',
|
||||
canvasHeight: 'getCanvasHeight',
|
||||
refreshRate: 'getRefreshRate'
|
||||
refreshRate: 'getRefreshRate',
|
||||
drawingDirection: 'getDrawingDirection'
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@ -71,6 +82,12 @@ export default {
|
||||
updateRefreshRate: function(event) {
|
||||
const elem = event.target
|
||||
this.$store.commit('setRefreshRate', elem.value)
|
||||
},
|
||||
updateDrawingDirection: function(event) {
|
||||
const elem = event.target
|
||||
const value = elem.checked ? "x" : "y"
|
||||
this.$store.commit('setDrawingDirection', value)
|
||||
console.log(this.drawingDirection)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user