|
@@ -114,12 +114,6 @@ export const createBoard = (
|
|
|
} as any);
|
|
|
board.history.clear();
|
|
|
},
|
|
|
- hidenPois() {
|
|
|
- const pois = board.tree.entrys.pois as Entity[];
|
|
|
- pois.forEach((poi) => {
|
|
|
- poi.shape.hide();
|
|
|
- });
|
|
|
- },
|
|
|
setCamera(camera: OrthographicCamera) {
|
|
|
// -1 - 1转到屏幕
|
|
|
// const bound = board.bound.bound;
|
|
@@ -174,15 +168,20 @@ export const createBoard = (
|
|
|
});
|
|
|
},
|
|
|
showPois() {
|
|
|
- if (!board.tree.entrys) return;
|
|
|
+ if (!board.tree.entrys.pois) return;
|
|
|
const pois = board.tree.entrys.pois as Entity[];
|
|
|
pois.forEach((poi) => {
|
|
|
poi.shape.show();
|
|
|
});
|
|
|
},
|
|
|
+ hidenPois() {
|
|
|
+ if (!board.tree.entrys.pois) return;
|
|
|
+ const pois = board.tree.entrys.pois as Entity[];
|
|
|
+ pois.forEach((poi) => {
|
|
|
+ poi.shape.hide();
|
|
|
+ });
|
|
|
+ },
|
|
|
addPoi(type: string) {
|
|
|
- if (!board.tree.entrys) return;
|
|
|
-
|
|
|
board.tree.bus.emit("dataChangeBefore");
|
|
|
const { promise, interrupt } = addEntityAttrib(board.tree, (pos) => {
|
|
|
const attrib = {
|