Skip to content

Commit e44ab3c

Browse files
committed
Fix iOS undefined function
1 parent a01ab94 commit e44ab3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

imagecropper.ios.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class TOCropViewControllerDelegateImpl extends NSObject {
109109
export class ImageCropper{
110110
public show(image:imageSource.ImageSource, options?:OptionsCommon):Thenable<Result>{
111111
// console.log("ImageCropper.show");
112+
let _that = this;
112113
return new Promise<Result>((resolve,reject) => {
113114
_options = options;
114115
if(image.ios){
@@ -124,7 +125,7 @@ export class ImageCropper{
124125
page.presentViewControllerAnimatedCompletion(viewController,true,function(){
125126
//Set Fixed Crop Size
126127
if(_options && _options.width && _options.height){
127-
var gcd = this._gcd(_options.width,_options.height);
128+
var gcd = _that._gcd(_options.width,_options.height);
128129

129130
viewController.toolbar.clampButtonHidden = true;
130131
// viewController.toolbar.setNeedsLayout();

0 commit comments

Comments
 (0)