Skip to content

Commit 2fdcb7c

Browse files
Dimitar TachevDimitar Tachev
authored andcommitted
Make the demo apps more realistic and fixed a typo in the ts definition.
1 parent 34b0302 commit 2fdcb7c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

demo-angular/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Label text="saveToGallery"></Label>
44
<Switch [(ngModel)]="saveToGallery"></Switch>
55
</StackLayout>
6-
<Image row="1" [src]="cameraImage" stretch="aspectFit" margin="10"></Image>
6+
<Image row="1" [src]="cameraImage" stretch="fill" margin="10"></Image>
77
<StackLayout orientation="horizontal" row="2" padding="10">
88
<Button text="Take Picture" (tap)='onTakePictureTap($event)'></Button>
99
<Button text="Request Permissions" (tap)='onRequestPermissionsTap()'></Button>

demo-angular/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class AppComponent {
1212
public cameraImage: ImageAsset;
1313

1414
onTakePictureTap(args) {
15-
takePicture({ width: 180, height: 180, keepAspectRatio: false, saveToGallery: this.saveToGallery })
15+
takePicture({ width: 180, height: 180, keepAspectRatio: true, saveToGallery: this.saveToGallery })
1616
.then((imageAsset) => {
1717
let source = new ImageSource();
1818
source.fromAsset(imageAsset).then((source) => {

demo/app/main-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function onRequestPermissionsTap(args: EventData) {
2323
export function onTakePictureTap(args: EventData) {
2424
let page = <Page>(<View>args.object).page;
2525
let saveToGallery = page.bindingContext.get("saveToGallery");
26-
takePicture({width: 180, height: 180, keepAspectRatio: false, saveToGallery: saveToGallery}).
26+
takePicture({width: 180, height: 180, keepAspectRatio: true, saveToGallery: saveToGallery}).
2727
then((imageAsset) => {
2828
let source = new imageSourceModule.ImageSource();
2929
source.fromAsset(imageAsset).then((source) => {

demo/app/main-page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Label text="saveToGallery" />
55
<Switch checked="{{ saveToGallery }}"/>
66
</StackLayout>
7-
<Image row="1" src="{{ cameraImage }}" id="image" stretch="aspectFill" margin="10"/>
7+
<Image row="1" src="{{ cameraImage }}" id="image" stretch="fill" margin="10"/>
88
<StackLayout orientation="horizontal" row="2" padding="10">
99
<Button text="Take Picture" tap="onTakePictureTap" />
1010
<Button text="Request Permissions" tap="onRequestPermissionsTap" />

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface CameraOptions {
3333

3434
/**
3535
* Defines if camera picture aspect ratio should be kept during picture resizing.
36-
* This property could affect width or heigth return values.
36+
* This property could affect width or height return values.
3737
*/
3838
keepAspectRatio?: boolean;
3939

0 commit comments

Comments
 (0)