scandit-capacitor-datacapture-parser
Advanced tools
Comparing version 6.19.0 to 6.19.1
@@ -0,3 +1,9 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { Capacitor } from './Capacitor/Capacitor'; | ||
import { DefaultSerializeable } from './Serializeable'; | ||
import { DefaultSerializeable, ignoreFromSerialization } from './Serializeable'; | ||
export var FrameSourceState; | ||
@@ -78,4 +84,6 @@ (function (FrameSourceState) { | ||
settings.shouldPreferSmoothAutoFocus = json.shouldPreferSmoothAutoFocus; | ||
if (json.api !== undefined && json.api !== null) { | ||
settings.api = json.api; | ||
if (json.properties != undefined) { | ||
for (const key of Object.keys(json.properties)) { | ||
settings.setProperty(key, json.properties[key]); | ||
} | ||
} | ||
@@ -86,2 +94,9 @@ return settings; | ||
super(); | ||
this.focusHiddenProperties = [ | ||
'range', | ||
'manualLensPosition', | ||
'shouldPreferSmoothAutoFocus', | ||
'focusStrategy', | ||
'focusGestureStrategy' | ||
]; | ||
this.preferredResolution = Capacitor.defaults.Camera.Settings.preferredResolution; | ||
@@ -103,8 +118,18 @@ this.zoomFactor = Capacitor.defaults.Camera.Settings.zoomFactor; | ||
setProperty(name, value) { | ||
if (this.focusHiddenProperties.includes(name)) { | ||
this.focus[name] = value; | ||
return; | ||
} | ||
this[name] = value; | ||
} | ||
getProperty(name) { | ||
if (this.focusHiddenProperties.includes(name)) { | ||
return this.focus[name]; | ||
} | ||
return this[name]; | ||
} | ||
} | ||
__decorate([ | ||
ignoreFromSerialization | ||
], CameraSettings.prototype, "focusHiddenProperties", void 0); | ||
export class ImageBuffer { | ||
@@ -111,0 +136,0 @@ get width() { |
@@ -73,2 +73,5 @@ import { CameraPosition, CameraSettings, FocusGestureStrategy, FocusRange, VideoResolution } from '../Camera+Related'; | ||
shouldPreferSmoothAutoFocus: boolean; | ||
properties: { | ||
[key: string]: any; | ||
}; | ||
} | ||
@@ -75,0 +78,0 @@ export interface PrivateCameraSettingsDefaults { |
@@ -14,2 +14,3 @@ import { Color, MarginsWithUnit, NumberWithUnit, PointWithUnit, SizeWithUnitAndAspect, } from '../Common'; | ||
shouldPreferSmoothAutoFocus: json.Camera.Settings.shouldPreferSmoothAutoFocus, | ||
properties: json.Camera.Settings.properties, | ||
}, | ||
@@ -16,0 +17,0 @@ defaultPosition: (json.Camera.defaultPosition || null), |
@@ -151,3 +151,5 @@ export type Optional<T> = T | null; | ||
shouldPreferSmoothAutoFocus: boolean; | ||
api: number; | ||
properties: { | ||
[key: string]: any; | ||
}; | ||
} | ||
@@ -158,2 +160,3 @@ interface PrivateCameraSettings { | ||
export class CameraSettings { | ||
private focusHiddenProperties; | ||
preferredResolution: VideoResolution; | ||
@@ -160,0 +163,0 @@ zoomFactor: number; |
{ | ||
"name": "scandit-capacitor-datacapture-parser", | ||
"version": "6.19.0", | ||
"version": "6.19.1", | ||
"description": "Scandit Data Capture SDK for Capacitor", | ||
@@ -37,3 +37,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"scandit-capacitor-datacapture-core": "6.19.0" | ||
"scandit-capacitor-datacapture-core": "6.19.1" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
274700
3299
+ Addedscandit-capacitor-datacapture-core@6.19.1(transitive)
- Removedscandit-capacitor-datacapture-core@6.19.0(transitive)