forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcanvas.ts
More file actions
20 lines (16 loc) · 508 Bytes
/
canvas.ts
File metadata and controls
20 lines (16 loc) · 508 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
}
}