summaryrefslogtreecommitdiff
path: root/src/client/components/page/page.canvas.vue
blob: d3bf5c1de6c4cd34791fb3ea3c59c30e14bb5791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
<div class="ysrxegms">
	<canvas ref="canvas" :width="value.width" :height="value.height"/>
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import * as os from '@/os';

export default defineComponent({
	props: {
		value: {
			required: true
		},
		hpml: {
			required: true
		}
	},
	mounted() {
		this.hpml.registerCanvas(this.value.name, this.$refs.canvas);
	}
});
</script>

<style lang="scss" scoped>
.ysrxegms {
	display: inline-block;
	vertical-align: bottom;
	overflow: auto;
	max-width: 100%;

	> canvas {
		display: block;
	}
}
</style>