2021-02-13 01:51:01 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2021-03-29 01:50:33 +00:00
|
|
|
<vue-draggable-resizable
|
2021-04-01 23:01:36 +00:00
|
|
|
@dragstop="onDragStop"
|
|
|
|
style="z-index: 5;"
|
2021-03-29 01:50:33 +00:00
|
|
|
:min-width="200"
|
|
|
|
:max-width="500"
|
2021-04-01 23:01:36 +00:00
|
|
|
:min-height="200"
|
|
|
|
:max-height="500"
|
|
|
|
:x="$store.getters.getDebugPanelState.x"
|
|
|
|
:y="$store.getters.getDebugPanelState.y"
|
2021-02-13 01:51:01 +00:00
|
|
|
>
|
2021-04-01 23:01:36 +00:00
|
|
|
|
|
|
|
<t-card style="height: 100%;">
|
2021-03-29 05:10:31 +00:00
|
|
|
<p v-html="`Tool: ${$store.getters.getCurrentTool}`"></p>
|
|
|
|
<p v-html="`FgColour: ${$store.getters.getFgColour}`"></p>
|
|
|
|
<p v-html="`BgColor: ${$store.getters.getBgColour}`"></p>
|
2021-03-29 08:21:23 +00:00
|
|
|
<p v-html="`Char: ${$store.getters.getToolbarState.selectedChar}`"></p>
|
2021-03-29 05:10:31 +00:00
|
|
|
|
|
|
|
<p v-html="`canvasX: ${canvasX}`"></p>
|
|
|
|
<p v-html="`canvasY: ${canvasY}`"></p>
|
2021-03-29 01:50:33 +00:00
|
|
|
</t-card>
|
2021-04-01 23:01:36 +00:00
|
|
|
|
2021-02-13 01:51:01 +00:00
|
|
|
</vue-draggable-resizable>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2021-03-29 01:50:33 +00:00
|
|
|
created() {},
|
2021-02-13 01:51:01 +00:00
|
|
|
name: "DebugPanel",
|
2021-03-29 05:10:31 +00:00
|
|
|
props: ["canvasX", "canvasY"],
|
2021-02-13 01:51:01 +00:00
|
|
|
data: () => ({
|
|
|
|
floating: {
|
|
|
|
width: 0,
|
|
|
|
height: 0,
|
|
|
|
x: 100,
|
|
|
|
y: 100,
|
|
|
|
},
|
2021-04-01 23:01:36 +00:00
|
|
|
throttle: true,
|
2021-02-13 01:51:01 +00:00
|
|
|
}),
|
2021-03-29 01:50:33 +00:00
|
|
|
computed: {},
|
|
|
|
watch: {},
|
2021-02-13 01:51:01 +00:00
|
|
|
methods: {
|
|
|
|
onResize(x, y, width, height) {
|
|
|
|
this.floating.x = x;
|
|
|
|
this.floating.y = y;
|
|
|
|
this.floating.width = width;
|
|
|
|
this.floating.height = height;
|
|
|
|
},
|
2021-04-01 23:01:36 +00:00
|
|
|
onDragStop(x, y) {
|
2021-02-13 01:51:01 +00:00
|
|
|
this.floating.x = x;
|
|
|
|
this.floating.y = y;
|
2021-04-01 23:01:36 +00:00
|
|
|
|
|
|
|
this.$store.commit("changeDebugPanelState", {x: x, y: y})
|
2021-02-13 01:51:01 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|