2022-02-16 11:20:17 +08:00

20 lines
508 B
TypeScript

import { Designer } from '@alilc/lowcode-designer';
import { designerSymbol } from './symbols';
import DropLocation from './drop-location';
export default class Canvas {
private readonly [designerSymbol]: Designer;
constructor(designer: Designer) {
this[designerSymbol] = designer;
}
static create(designer: Designer) {
if (!designer) return null;
return new Canvas(designer);
}
get dropLocation() {
return DropLocation.create(this[designerSymbol].dropLocation || null);
}
}