!518 【master】图库中打开图片后图片拖动后会出现卡住现象

Merge pull request !518 from liujuan/master
This commit is contained in:
openharmony_ci 2024-02-28 06:18:14 +00:00 committed by Gitee
commit ba2b89b3fd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -453,20 +453,11 @@ export struct PhotoItem {
.onActionStart((event?: GestureEvent) => {
Log.info(TAG, `PanGesture start offsetX:\
${vp2px((event as GestureEvent).offsetX)}, offsetY: ${vp2px((event as GestureEvent).offsetY)}`);
if (this.isNeedShieldPullUpEvent((event as GestureEvent))) {
Log.info(TAG, `shield pullup event, is album recycle = ${this.albumUri == UserFileManagerAccess.getInstance()
.getSystemAlbumUri(UserFileManagerAccess.TRASH_ALBUM_SUB_TYPE)},\
is photo scaled = ${this.isPhotoScaled}, is pull Up = ${(event as GestureEvent).offsetY < 0}`);
return;
}
this.eventPipeline?.onMoveStart(vp2px((event as GestureEvent).offsetX), vp2px((event as GestureEvent).offsetY));
})
.onActionUpdate((event?: GestureEvent) => {
Log.info(TAG, `PanGesture update offsetX:\
${vp2px((event as GestureEvent).offsetX)}, offsetY: ${vp2px((event as GestureEvent).offsetY)}`);
if (this.isNeedShieldPullUpEvent((event as GestureEvent))) {
return;
}
this.eventPipeline?.onMove(vp2px((event as GestureEvent).offsetX), vp2px((event as GestureEvent).offsetY));
this.isPullDownAndDragPhoto = this.eventPipeline?.canPullDownAndDragPhoto() ?? false;
if (this.isPullDownAndDragPhoto && this.geometryTransitionEnable &&
@ -478,7 +469,7 @@ export struct PhotoItem {
Log.info(TAG, `PanGesture end offsetX:\
${vp2px((event as GestureEvent).offsetX)}, offsetY: ${vp2px((event as GestureEvent).offsetY)} \
this.isOnSwiperAnimation ${this.isOnSwiperAnimation}`);
if (this.isOnSwiperAnimation || this.isNeedShieldPullUpEvent((event as GestureEvent))) {
if (this.isOnSwiperAnimation) {
return;
}
this.eventPipeline?.onMoveEnd(vp2px((event as GestureEvent).offsetX), vp2px((event as GestureEvent).offsetY));