应用合并成大文件夹,长安无法拖动

Signed-off-by: zhengyongjie <15531316327@163.com>
This commit is contained in:
zhengyongjie 2024-09-04 10:20:44 +08:00
parent 77e200c01a
commit d2f124e2b1

View File

@ -199,6 +199,20 @@ export struct FolderComponent {
Log.showInfo(TAG, `getPosition animatePosition x: ${this.animateFolderPositionX}, y: ${this.animateFolderPositionY}`);
}
// dragStart = (event: DragEvent): CustomBuilder => {
// ContextMenu.close();
// this.dragItemType = CommonConstants.DRAG_FROM_DESKTOP;
// this.folderItem.isDragging = true;
// this.pageDesktopDragItemInfo = this.folderItem;
// const selectAppIndex = PageDesktopDragHandler.getInstance().getItemIndex(event.getWindowX(), event.getWindowY());
// const startPosition = PageDesktopDragHandler.getInstance().getTouchPosition(event.getWindowX(), event.getWindowY())
// PageDesktopDragHandler.getInstance().mStartPosition = startPosition;
// AppStorage.setOrCreate('selectAppIndex', selectAppIndex);
// Log.showInfo(TAG, `onDragStart event: [${event.getWindowX()}, ${event.getWindowY()}], selectAppIndex: ${selectAppIndex}`);
// }
build() {
Column() {
Column() {
@ -335,10 +349,10 @@ export struct FolderComponent {
Log.showInfo(TAG, `onHover isHover:${isHover}`);
this.isHover = isHover;
})
.bindContextMenu(this.MenuBuilder, ResponseType.LongPress)
.onDragStart((event: DragEvent) => {
return this.dragStart(event);
})
.bindContextMenu(this.MenuBuilder, ResponseType.LongPress)
.onDragEnd((event: DragEvent, extraParams: string) => {
Log.showInfo(TAG, `onDragEnd event: [${event.getWindowX()}, ${event.getWindowY()}]` + event.getResult());
AppStorage.setOrCreate<LauncherDragItemInfo>('dragItemInfo', new LauncherDragItemInfo());