bill 1 年之前
父節點
當前提交
4752e314f8
共有 3 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      src/app/liantong/index.ts
  2. 1 0
      src/board/shared/act.ts
  3. 1 1
      src/board/shared/shape-mose.ts

+ 1 - 0
src/app/liantong/index.ts

@@ -126,6 +126,7 @@ export const createBoard = (
       pois.forEach((poi) => poi.visible(false));
       pois.forEach((poi) => poi.visible(false));
     },
     },
     addPoi(type: string) {
     addPoi(type: string) {
+      console.log(pois());
       if (!pois()) {
       if (!pois()) {
         const data = board.getData();
         const data = board.getData();
         data.pois = [];
         data.pois = [];

+ 1 - 0
src/board/shared/act.ts

@@ -82,6 +82,7 @@ export const pathsToActShape = (props: PathsToActShapeProps, test = false) => {
       const attrib = pathAttribs[ndx];
       const attrib = pathAttribs[ndx];
       attrib.fill && path.fill(attrib.fill);
       attrib.fill && path.fill(attrib.fill);
       attrib.stroke && path.stroke(attrib.stroke);
       attrib.stroke && path.stroke(attrib.stroke);
+      console.log(attrib.fill, attrib.stroke);
       attrib.strokeWidth && path.strokeWidth(attrib.strokeWidth);
       attrib.strokeWidth && path.strokeWidth(attrib.strokeWidth);
     });
     });
   };
   };

+ 1 - 1
src/board/shared/shape-mose.ts

@@ -94,7 +94,7 @@ export const openShapeMouseStyles = <T extends Shape | Group>(
     // console.log(shape.id(), api, outStatus);
     // console.log(shape.id(), api, outStatus);
     api = api || "common";
     api = api || "common";
     if (prevApi !== api) {
     if (prevApi !== api) {
-      styles[api](ev);
+      styles[api] && styles[api](ev);
       prevApi = api;
       prevApi = api;
     }
     }
   };
   };