From b68664c5331c4e05f0f0a6510d8d434b56eedca1 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Wed, 24 Feb 2021 12:19:56 +0100 Subject: [PATCH] Controls: Remove calls of stopPropagation(). --- examples/js/controls/FirstPersonControls.js | 2 -- examples/js/controls/FlyControls.js | 2 -- examples/js/controls/OrbitControls.js | 2 -- examples/js/controls/TrackballControls.js | 5 ----- examples/jsm/controls/FirstPersonControls.js | 2 -- examples/jsm/controls/FlyControls.js | 2 -- examples/jsm/controls/OrbitControls.js | 2 -- examples/jsm/controls/TrackballControls.js | 5 ----- 8 files changed, 22 deletions(-) diff --git a/examples/js/controls/FirstPersonControls.js b/examples/js/controls/FirstPersonControls.js index 47b843af2bcbda..2f886b0dc5b57f 100644 --- a/examples/js/controls/FirstPersonControls.js +++ b/examples/js/controls/FirstPersonControls.js @@ -92,7 +92,6 @@ THREE.FirstPersonControls = function ( object, domElement ) { } event.preventDefault(); - event.stopPropagation(); if ( this.activeLook ) { @@ -112,7 +111,6 @@ THREE.FirstPersonControls = function ( object, domElement ) { this.onMouseUp = function ( event ) { event.preventDefault(); - event.stopPropagation(); if ( this.activeLook ) { diff --git a/examples/js/controls/FlyControls.js b/examples/js/controls/FlyControls.js index 2e1f2ac583288a..2b3fb71d36f1a9 100644 --- a/examples/js/controls/FlyControls.js +++ b/examples/js/controls/FlyControls.js @@ -117,7 +117,6 @@ THREE.FlyControls = function ( object, domElement ) { } event.preventDefault(); - event.stopPropagation(); if ( this.dragToLook ) { @@ -158,7 +157,6 @@ THREE.FlyControls = function ( object, domElement ) { this.mouseup = function ( event ) { event.preventDefault(); - event.stopPropagation(); if ( this.dragToLook ) { diff --git a/examples/js/controls/OrbitControls.js b/examples/js/controls/OrbitControls.js index 54a09ef8815227..963b13df72f911 100644 --- a/examples/js/controls/OrbitControls.js +++ b/examples/js/controls/OrbitControls.js @@ -989,7 +989,6 @@ THREE.OrbitControls = function ( object, domElement ) { if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return; event.preventDefault(); - event.stopPropagation(); scope.dispatchEvent( startEvent ); @@ -1098,7 +1097,6 @@ THREE.OrbitControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); // prevent scrolling - event.stopPropagation(); switch ( state ) { diff --git a/examples/js/controls/TrackballControls.js b/examples/js/controls/TrackballControls.js index 8294addcb32aed..8a1a82310f1f16 100644 --- a/examples/js/controls/TrackballControls.js +++ b/examples/js/controls/TrackballControls.js @@ -483,7 +483,6 @@ THREE.TrackballControls = function ( object, domElement ) { function onMouseDown( event ) { event.preventDefault(); - event.stopPropagation(); if ( _state === STATE.NONE ) { @@ -539,7 +538,6 @@ THREE.TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); var state = ( _keyState !== STATE.NONE ) ? _keyState : _state; @@ -565,7 +563,6 @@ THREE.TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); _state = STATE.NONE; @@ -583,7 +580,6 @@ THREE.TrackballControls = function ( object, domElement ) { if ( scope.noZoom === true ) return; event.preventDefault(); - event.stopPropagation(); switch ( event.deltaMode ) { @@ -646,7 +642,6 @@ THREE.TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); switch ( event.touches.length ) { diff --git a/examples/jsm/controls/FirstPersonControls.js b/examples/jsm/controls/FirstPersonControls.js index 98ba36b0d79b7b..798cd5daa7f339 100644 --- a/examples/jsm/controls/FirstPersonControls.js +++ b/examples/jsm/controls/FirstPersonControls.js @@ -98,7 +98,6 @@ var FirstPersonControls = function ( object, domElement ) { } event.preventDefault(); - event.stopPropagation(); if ( this.activeLook ) { @@ -118,7 +117,6 @@ var FirstPersonControls = function ( object, domElement ) { this.onMouseUp = function ( event ) { event.preventDefault(); - event.stopPropagation(); if ( this.activeLook ) { diff --git a/examples/jsm/controls/FlyControls.js b/examples/jsm/controls/FlyControls.js index 3f602dae3971a4..0e7754657932c4 100644 --- a/examples/jsm/controls/FlyControls.js +++ b/examples/jsm/controls/FlyControls.js @@ -123,7 +123,6 @@ var FlyControls = function ( object, domElement ) { } event.preventDefault(); - event.stopPropagation(); if ( this.dragToLook ) { @@ -164,7 +163,6 @@ var FlyControls = function ( object, domElement ) { this.mouseup = function ( event ) { event.preventDefault(); - event.stopPropagation(); if ( this.dragToLook ) { diff --git a/examples/jsm/controls/OrbitControls.js b/examples/jsm/controls/OrbitControls.js index 91f158f20e4290..092e70f578aa82 100644 --- a/examples/jsm/controls/OrbitControls.js +++ b/examples/jsm/controls/OrbitControls.js @@ -999,7 +999,6 @@ var OrbitControls = function ( object, domElement ) { if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return; event.preventDefault(); - event.stopPropagation(); scope.dispatchEvent( startEvent ); @@ -1108,7 +1107,6 @@ var OrbitControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); // prevent scrolling - event.stopPropagation(); switch ( state ) { diff --git a/examples/jsm/controls/TrackballControls.js b/examples/jsm/controls/TrackballControls.js index d1107780c80c63..a438d74e12ce03 100644 --- a/examples/jsm/controls/TrackballControls.js +++ b/examples/jsm/controls/TrackballControls.js @@ -491,7 +491,6 @@ var TrackballControls = function ( object, domElement ) { function onMouseDown( event ) { event.preventDefault(); - event.stopPropagation(); if ( _state === STATE.NONE ) { @@ -547,7 +546,6 @@ var TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); var state = ( _keyState !== STATE.NONE ) ? _keyState : _state; @@ -573,7 +571,6 @@ var TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); _state = STATE.NONE; @@ -591,7 +588,6 @@ var TrackballControls = function ( object, domElement ) { if ( scope.noZoom === true ) return; event.preventDefault(); - event.stopPropagation(); switch ( event.deltaMode ) { @@ -654,7 +650,6 @@ var TrackballControls = function ( object, domElement ) { if ( scope.enabled === false ) return; event.preventDefault(); - event.stopPropagation(); switch ( event.touches.length ) {