"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"
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue