"mouse" to "pointer" events

This commit is contained in:
Jörn-Michael Miehe 2023-01-17 14:09:13 +00:00
parent d16abe2658
commit 9fa1498af3

View file

@ -6,9 +6,9 @@
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1000 1000"
preserveAspectRatio="none"
@mousedown="on_mousedown"
@mousemove="on_mousemove"
@mouseup="on_mouseup"
@pointerdown="on_pointerdown"
@pointermove="on_pointermove"
@pointerup="on_pointerup"
>
<rect
v-if="preview_state.visible"
@ -48,17 +48,17 @@ export default class CalendarImage extends Vue {
corner2: new Vector2D(),
};
private on_mousedown(event: MouseEvent) {
private on_pointerdown(event: MouseEvent) {
this.preview_state.visible = true;
this.preview_state.corner1 = get_event_thous(event);
this.preview_state.corner2 = get_event_thous(event);
}
private on_mousemove(event: MouseEvent) {
private on_pointermove(event: MouseEvent) {
this.preview_state.corner2 = get_event_thous(event);
}
private on_mouseup() {
private on_pointerup() {
this.preview_state.visible = false;
}