@@ -95,10 +95,10 @@ export default {
95
95
var i ,
96
96
vis = [ {
97
97
node : _canvas . dom . frequency ,
98
- prop : config . showFrequency
98
+ prop : config . debug . showFrequency
99
99
} , {
100
100
node : _canvas . dom . pattern ,
101
- prop : config . showPattern
101
+ prop : config . debug . showPattern
102
102
} ] ;
103
103
104
104
for ( i = 0 ; i < vis . length ; i ++ ) {
@@ -154,12 +154,12 @@ export default {
154
154
i ,
155
155
barcodeLine = Bresenham . getBarcodeLine ( inputImageWrapper , line [ 0 ] , line [ 1 ] ) ;
156
156
157
- if ( config . showFrequency ) {
157
+ if ( ENV . development && config . debug . showFrequency ) {
158
158
ImageDebug . drawPath ( line , { x : 'x' , y : 'y' } , _canvas . ctx . overlay , { color : 'red' , lineWidth : 3 } ) ;
159
159
Bresenham . debug . printFrequency ( barcodeLine . line , _canvas . dom . frequency ) ;
160
160
}
161
161
Bresenham . toBinaryLine ( barcodeLine ) ;
162
- if ( config . showPattern ) {
162
+ if ( ENV . development && config . debug . showPattern ) {
163
163
Bresenham . debug . printPattern ( barcodeLine . line , _canvas . dom . pattern ) ;
164
164
}
165
165
@@ -228,8 +228,10 @@ export default {
228
228
result ,
229
229
lineLength ;
230
230
231
- if ( config . drawBoundingBox && ctx ) {
232
- ImageDebug . drawPath ( box , { x : 0 , y : 1 } , ctx , { color : "blue" , lineWidth : 2 } ) ;
231
+ if ( ENV . development ) {
232
+ if ( config . debug . drawBoundingBox && ctx ) {
233
+ ImageDebug . drawPath ( box , { x : 0 , y : 1 } , ctx , { color : "blue" , lineWidth : 2 } ) ;
234
+ }
233
235
}
234
236
235
237
line = getLine ( box ) ;
0 commit comments