mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-14 13:03:07 +00:00
fix: error when dragging in outline view
This commit is contained in:
parent
9444752a65
commit
b7d32fe8a1
54
docs/docs/api/model/drop-location.md
Normal file
54
docs/docs/api/model/drop-location.md
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
title: DropLocation
|
||||
sidebar_position: 13
|
||||
---
|
||||
|
||||
> **@types** [IPublicModelDropLocation](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/drop-location.ts)<br/>
|
||||
> **@since** v1.1.0
|
||||
|
||||
|
||||
## 基本介绍
|
||||
|
||||
拖拽放置位置模型
|
||||
|
||||
## 变量
|
||||
|
||||
### target
|
||||
|
||||
拖拽放置位置目标
|
||||
|
||||
`@type {IPublicModelNode}`
|
||||
|
||||
相关类型:[IPublicModelNode](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/node.ts)
|
||||
|
||||
### detail
|
||||
|
||||
拖拽放置位置详情
|
||||
|
||||
`@type {IPublicTypeLocationDetail}`
|
||||
|
||||
相关类型:[IPublicTypeLocationDetail](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/location-detail.ts)
|
||||
|
||||
### event
|
||||
|
||||
拖拽放置位置对应的事件
|
||||
|
||||
`@type {IPublicTypeLocationDetail}`
|
||||
|
||||
相关类型:[IPublicModelLocateEvent](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/location-event.ts)
|
||||
|
||||
## 方法签名
|
||||
|
||||
### clone
|
||||
|
||||
获取一份当前对象的克隆
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* 获取一份当前对象的克隆
|
||||
* get a clone object of current dropLocation
|
||||
*/
|
||||
clone(event: IPublicModelLocateEvent): IPublicModelDropLocation;
|
||||
```
|
||||
|
||||
相关类型:[IPublicModelLocateEvent](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/location-event.ts)
|
||||
@ -101,10 +101,6 @@ export function getWindow(elem: Element | Document): Window {
|
||||
}
|
||||
export interface IDropLocation extends IPublicModelDropLocation {
|
||||
|
||||
readonly target: INode;
|
||||
|
||||
readonly event: ILocateEvent;
|
||||
|
||||
readonly source: string;
|
||||
|
||||
get document(): IPublicModelDocumentModel;
|
||||
|
||||
@ -27,6 +27,10 @@ export class DropLocation implements IPublicModelDropLocation {
|
||||
return this[dropLocationSymbol].detail;
|
||||
}
|
||||
|
||||
get event(): IPublicModelLocateEvent {
|
||||
return this[dropLocationSymbol].event;
|
||||
}
|
||||
|
||||
clone(event: IPublicModelLocateEvent): IPublicModelDropLocation {
|
||||
return new DropLocation(this[dropLocationSymbol].clone(event));
|
||||
}
|
||||
|
||||
@ -1,10 +1,29 @@
|
||||
import { IPublicTypeLocationDetail } from '../type';
|
||||
import { IPublicModelLocateEvent } from './';
|
||||
import { IPublicModelLocateEvent, IPublicModelNode } from './';
|
||||
|
||||
export interface IPublicModelDropLocation {
|
||||
get target(): any;
|
||||
|
||||
readonly detail: IPublicTypeLocationDetail;
|
||||
/**
|
||||
* 拖拽位置目标
|
||||
* get target of dropLocation
|
||||
*/
|
||||
get target(): IPublicModelNode;
|
||||
|
||||
/**
|
||||
* 拖拽放置位置详情
|
||||
* get detail of dropLocation
|
||||
*/
|
||||
get detail(): IPublicTypeLocationDetail;
|
||||
|
||||
/**
|
||||
* 拖拽放置位置对应的事件
|
||||
* get event of dropLocation
|
||||
*/
|
||||
get event(): IPublicModelLocateEvent;
|
||||
|
||||
/**
|
||||
* 获取一份当前对象的克隆
|
||||
* get a clone object of current dropLocation
|
||||
*/
|
||||
clone(event: IPublicModelLocateEvent): IPublicModelDropLocation;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user