mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-07 02:47:12 +00:00
23 lines
572 B
TypeScript
23 lines
572 B
TypeScript
import {
|
|
DropLocation as InnerDropLocation,
|
|
} from '@ali/lowcode-designer';
|
|
import { dropLocationSymbol } from './symbols';
|
|
import Node from './node';
|
|
|
|
export default class DropLocation {
|
|
private readonly [dropLocationSymbol]: InnerDropLocation;
|
|
|
|
constructor(dropLocation: InnerDropLocation) {
|
|
this[dropLocationSymbol] = dropLocation;
|
|
}
|
|
|
|
static create(dropLocation: InnerDropLocation | null) {
|
|
if (!dropLocation) return null;
|
|
return new DropLocation(dropLocation);
|
|
}
|
|
|
|
get target() {
|
|
return Node.create(this[dropLocationSymbol].target);
|
|
}
|
|
}
|