From a2f28f738a34d32ee971c9162d33ffcf26a792c1 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 3 Jun 2019 00:45:59 +0200 Subject: [PATCH] rogue console.log removal --- src/ext/conf/Debug.js | 12 +++++++----- src/ext/lib/ar-detect/ArDetector.js | 4 +++- src/ext/lib/ar-detect/edge-detect/EdgeDetect.js | 3 --- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/ext/conf/Debug.js b/src/ext/conf/Debug.js index 8aa15c7..b047a89 100644 --- a/src/ext/conf/Debug.js +++ b/src/ext/conf/Debug.js @@ -28,12 +28,12 @@ var Debug = { // canvas: { // debugDetection: true // }, - // debugCanvas: { + debugCanvas: { // enabled: true, // guardLine: true // enabled: false, // guardLine: false - // } + } } if(_prod){ @@ -41,12 +41,14 @@ if(_prod){ } function __disableAllDebug(obj) { - for(key in obj) { + for(let key in obj) { if (obj.hasOwnProperty(key) ){ - if(obj[key] instanceof Object) + if(obj[key] instanceof Object) { __disableAllDebug(obj[key]); - else + } + else { obj[key] = false; + } } } } diff --git a/src/ext/lib/ar-detect/ArDetector.js b/src/ext/lib/ar-detect/ArDetector.js index be59502..e2f91b1 100644 --- a/src/ext/lib/ar-detect/ArDetector.js +++ b/src/ext/lib/ar-detect/ArDetector.js @@ -60,7 +60,9 @@ class ArDetector { throw "Settings prevent autoar from starting" } } catch (e) { - console.log("%c[ArDetect::init] INITIALIZATION FAILED!\n", _ard_console_stop, e); + if (Debug.debug) { + console.log("%c[ArDetect::init] INITIALIZATION FAILED!\n", _ard_console_stop, e); + } } } diff --git a/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js b/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js index ce82805..d369a2a 100644 --- a/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js +++ b/src/ext/lib/ar-detect/edge-detect/EdgeDetect.js @@ -40,10 +40,7 @@ class EdgeDetect{ // edges = fastCandidates; // todo: processing // } else { edgeCandidates = this.edgeDetect(image, fastCandidates); - console.log("edge candidates:", edgeCandidates) bars = this.edgePostprocess(edgeCandidates, this.conf.canvas.height); - console.log("bars:", bars) - // } } catch (e) { if (Debug.debug) {