"mouse" to "pointer" events
This commit is contained in:
parent
d16abe2658
commit
9fa1498af3
1 changed files with 6 additions and 6 deletions
|
@ -6,9 +6,9 @@
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 1000 1000"
|
viewBox="0 0 1000 1000"
|
||||||
preserveAspectRatio="none"
|
preserveAspectRatio="none"
|
||||||
@mousedown="on_mousedown"
|
@pointerdown="on_pointerdown"
|
||||||
@mousemove="on_mousemove"
|
@pointermove="on_pointermove"
|
||||||
@mouseup="on_mouseup"
|
@pointerup="on_pointerup"
|
||||||
>
|
>
|
||||||
<rect
|
<rect
|
||||||
v-if="preview_state.visible"
|
v-if="preview_state.visible"
|
||||||
|
@ -48,17 +48,17 @@ export default class CalendarImage extends Vue {
|
||||||
corner2: new Vector2D(),
|
corner2: new Vector2D(),
|
||||||
};
|
};
|
||||||
|
|
||||||
private on_mousedown(event: MouseEvent) {
|
private on_pointerdown(event: MouseEvent) {
|
||||||
this.preview_state.visible = true;
|
this.preview_state.visible = true;
|
||||||
this.preview_state.corner1 = get_event_thous(event);
|
this.preview_state.corner1 = get_event_thous(event);
|
||||||
this.preview_state.corner2 = 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);
|
this.preview_state.corner2 = get_event_thous(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
private on_mouseup() {
|
private on_pointerup() {
|
||||||
this.preview_state.visible = false;
|
this.preview_state.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue