Skip to content

Commit 2dbbcaf

Browse files
author
Elena Hristova
committed
fix tslint errors
1 parent 7b4b15f commit 2dbbcaf

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

demo-angular/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class AppComponent {
2323
takePicture({ width: this.width, height: this.height, keepAspectRatio: this.keepAspectRatio, saveToGallery: this.saveToGallery })
2424
.then((imageAsset: any) => {
2525
this.cameraImage = imageAsset;
26-
var that = this;
26+
let that = this;
2727
imageAsset.getImageAsync(function (nativeImage) {
2828
if (imageAsset.android) {
2929
// get the current density of the screen (dpi) and divide it by the default one to get the scale
@@ -35,7 +35,7 @@ export class AppComponent {
3535
that.actualWidth = nativeImage.size.width * that.scale;
3636
that.actualHeight = nativeImage.size.height * that.scale;
3737
}
38-
that.labelText = `Displayed Size: ${that.actualWidth}x${that.actualHeight} with scale ${that.scale}\n`+
38+
that.labelText = `Displayed Size: ${that.actualWidth}x${that.actualHeight} with scale ${that.scale}\n` +
3939
`Image Size: ${Math.round(that.actualWidth / that.scale)}x${Math.round(that.actualHeight / that.scale)}`;
4040

4141
console.log(`${that.labelText}`);

demo/app/main-page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export function navigatingTo(args: EventData) {
1111
let page = <Page>args.object;
1212
let picturePath = null;
1313

14-
page.bindingContext = fromObject({
15-
cameraImage: picturePath,
14+
page.bindingContext = fromObject({
15+
cameraImage: picturePath,
1616
saveToGallery: false,
1717
keepAspectRatio: true,
1818
width: 320,
@@ -45,7 +45,7 @@ export function onTakePictureTap(args: EventData) {
4545
actualWidth = nativeImage.size.width * scale;
4646
actualHeight = nativeImage.size.height * scale;
4747
}
48-
let labelText = `Displayed Size: ${actualWidth}x${actualHeight} with scale ${scale}\n`+
48+
let labelText = `Displayed Size: ${actualWidth}x${actualHeight} with scale ${scale}\n` +
4949
`Image Size: ${Math.round(actualWidth / scale)}x${Math.round(actualHeight / scale)}`;
5050
page.bindingContext.set("labelText", labelText);
5151

src/camera.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export let takePicture = function (options?): Promise<any> {
129129
let pictureHeight = exif.getAttributeInt(android.media.ExifInterface.TAG_IMAGE_LENGTH, 0);
130130
let isPictureLandscape = pictureWidth > pictureHeight;
131131
let areOptionsLandscape = reqWidth > reqHeight;
132-
if (isPictureLandscape != areOptionsLandscape) {
132+
if (isPictureLandscape !== areOptionsLandscape) {
133133
let oldReqWidth = reqWidth;
134134
reqWidth = reqHeight;
135135
reqHeight = oldReqWidth;

src/camera.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class UIImagePickerControllerDelegateImpl extends NSObject implements UIImagePic
9696
if (this._keepAspectRatio) {
9797
let isPictureLandscape = imageAsset.nativeImage.size.width > imageAsset.nativeImage.size.height;
9898
let areOptionsLandscape = this._width > this._height;
99-
if (isPictureLandscape != areOptionsLandscape) {
99+
if (isPictureLandscape !== areOptionsLandscape) {
100100
let oldWidth = this._width;
101101
this._width = this._height;
102102
this._height = oldWidth;

0 commit comments

Comments
 (0)