Skip to content

Commit

Permalink
Merge pull request #174 from james-criscuolo/master
Browse files Browse the repository at this point in the history
first steps towards bypassing setImage with a custom file input
  • Loading branch information
cstefanache authored Apr 20, 2017
2 parents 36dea7c + 405ade4 commit 18765ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/imageCropperComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class ImageCropperComponent implements AfterViewInit, OnChanges {

@Input('settings') public settings:CropperSettings;
@Input('image') public image:any;
@Input('inputImage') public inputImage:any;
@Input() public cropper:ImageCropper;
@Input() public cropPosition:CropPosition;
@Output() public cropPositionChange:EventEmitter<CropPosition> = new EventEmitter<CropPosition>();
Expand Down Expand Up @@ -82,6 +83,10 @@ export class ImageCropperComponent implements AfterViewInit, OnChanges {
}
this.updateCropBounds();
}

if (changes.inputImage) {
this.setImage(changes.inputImage.currentValue);
}
}

public onTouchMove(event:TouchEvent):void {
Expand Down

0 comments on commit 18765ad

Please sign in to comment.