!475 【master】 图库--编辑图片选择滑动进度条调整图片大小,图片变黑

Merge pull request !475 from liujuan/master
This commit is contained in:
openharmony_ci 2023-12-08 06:33:05 +00:00 committed by Gitee
commit 2fac5f7374
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 14 deletions

View File

@ -44,20 +44,20 @@ export struct CropModeBar {
@State rulerSwitchOn: boolean = true;
@State frameStyleSwitchOn: boolean = true;
@StorageLink('rulerProperties') rulerProperties: RulerProperties = { rulerWidth: 0, rulerHeight: 0 };
private rulerChanged: Function = (): void => {};
private resetClicked: Function = (): void => {};
private rulerChangedFunc: Function = (number: number): void => this.onRulerChanged(number);
private resetClickedFunc: Function = (): void => this.onResetClicked();
private cropRulerBarHeight: number = Constants.VERTICAL_RULER_COMPONENT_HEIGHT;
aboutToAppear(): void {
this.rulerChanged = (number: number): void => this.onRulerChanged(number);
this.broadCast.on(Constants.RULER_CHANGED, (): void => this.rulerChanged());
this.resetClicked = (): void => this.onResetClicked();
this.broadCast.on(Constants.CROP_RESET_CLICKED, this.resetClicked);
this.broadCast.on(Constants.RULER_CHANGED, this.rulerChangedFunc);
this.broadCast.on(Constants.CROP_RESET_CLICKED, this.resetClickedFunc);
}
aboutToDisappear(): void {
this.broadCast.off(Constants.RULER_CHANGED, this.rulerChanged);
this.broadCast.off(Constants.CROP_RESET_CLICKED, this.resetClicked);
this.broadCast.off(Constants.RULER_CHANGED, this.rulerChangedFunc);
this.broadCast.off(Constants.CROP_RESET_CLICKED, this.resetClickedFunc);
this.isCropReset = false;
}

View File

@ -73,12 +73,6 @@ export struct CameraGridItemComponent {
let want: Want | null = result.want as Want;
if(want == null || want.parameters == null) return;
this.resultUri = want.parameters['resourceUri'] as string;
if (this.resultUri?.length > 0) {
this.isShow = true;
this.onShow();
}
}).catch((err: Error) => {
Log.error(TAG, `jumpCameraTakephoto err: ${err}`);
});