changeset 214:a46913c0e05d

Back out the previous relating to trying to prevent accidental zooming - will return to that later.
author Lucas Thompson <dev@lucas.im>
date Thu, 30 Mar 2017 15:57:17 +0100
parents ca07c8f7cc6b
children 9d5f377cc006
files src/app/waveform/waveform.component.ts
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/app/waveform/waveform.component.ts	Thu Mar 30 15:56:32 2017 +0100
+++ b/src/app/waveform/waveform.component.ts	Thu Mar 30 15:57:17 2017 +0100
@@ -283,6 +283,7 @@
 
       const zoom = (ev) => {
         if (ev.targetTouches.length < 2) return;
+        ev.preventDefault();
         const minZoom = componentTimeline.state.minZoom;
         const maxZoom = componentTimeline.state.maxZoom;
         const p1: Point = {
@@ -320,7 +321,6 @@
 
 
       const element: HTMLElement = this.trackDiv.nativeElement;
-      window.addEventListener('touchmove', (e) => e.preventDefault());
       element.addEventListener('touchstart', (e) => {
         if (e.targetTouches.length < 2) return;
         isZooming = true;