@@ -161,6 +161,14 @@ const qualityOptions = [
161
161
{ label : 'High' , value : CaptureQuality . high } ,
162
162
]
163
163
164
+ const zoomOptions = [
165
+ { label : '0%' , value : 0 } ,
166
+ { label : '25%' , value : 24 } ,
167
+ { label : '50%' , value : 49 } ,
168
+ { label : '75%' , value : 74 } ,
169
+ { label : '100%' , value : 99 } ,
170
+ ]
171
+
164
172
const countryOptions = [
165
173
{ label : 'eu' , value : 'eu' } ,
166
174
{ label : 'us' , value : 'us' } ,
@@ -179,12 +187,13 @@ export default class App extends Component {
179
187
} ,
180
188
captureQuality : CaptureQuality . medium ,
181
189
aspect : CaptureQuality . stretch ,
190
+ zoom : 0 ,
182
191
rotateMode : false ,
183
192
torchMode : false ,
184
193
showPlateOutline : true ,
185
194
plateOutlineColor : '#ff0000' ,
186
195
country : 'eu' ,
187
- touchToFocus : true ,
196
+ touchToFocus : false ,
188
197
}
189
198
190
199
async componentDidMount ( ) {
@@ -276,6 +285,7 @@ export default class App extends Component {
276
285
showPlateOutline,
277
286
captureQuality,
278
287
aspect,
288
+ zoom,
279
289
rotateMode,
280
290
torchMode,
281
291
country,
@@ -291,12 +301,13 @@ export default class App extends Component {
291
301
style = { styles . camera }
292
302
aspect = { aspect }
293
303
captureQuality = { captureQuality }
304
+ zoom = { zoom }
294
305
country = { country }
295
306
onPlateRecognized = { this . onPlateRecognized }
296
307
plateOutlineColor = { plateOutlineColor }
297
308
showPlateOutline = { showPlateOutline }
298
309
torchMode = { this . state . torchMode ? TorchMode . on : TorchMode . off }
299
- // rotateMode={this.state.rotateMode ? RotateMode.on : RotateMode.off}
310
+ rotateMode = { this . state . rotateMode ? RotateMode . on : RotateMode . off }
300
311
touchToFocus = { touchToFocus }
301
312
/>
302
313
) }
@@ -352,6 +363,12 @@ export default class App extends Component {
352
363
}
353
364
values = { colorOptions }
354
365
/>
366
+ < MyPicker
367
+ title = "Zoom"
368
+ selectedValue = { zoom }
369
+ onValueChange = { value => this . setState ( { zoom : value } ) }
370
+ values = { zoomOptions }
371
+ />
355
372
< MyPicker
356
373
title = "Quality"
357
374
selectedValue = { captureQuality }
0 commit comments