bill 1 年之前
父節點
當前提交
4346273c2a

+ 1 - 1
src/view/map/polygons.vue

@@ -107,7 +107,7 @@ const selectChange = (id: string) => {
       if (points.length) {
       if (points.length) {
         const total = points.reduce((t, p) => [t[0] + p.x, t[1] + p.y], [0, 0]);
         const total = points.reduce((t, p) => [t[0] + p.x, t[1] + p.y], [0, 0]);
         const view = mapManage.map.getView();
         const view = mapManage.map.getView();
-        view.setZoom(20);
+        // view.setZoom(20);
         setTimeout(() => {
         setTimeout(() => {
           view.setCenter([total[0] / points.length, total[1] / points.length]);
           view.setCenter([total[0] / points.length, total[1] / points.length]);
         }, 100);
         }, 100);

+ 1 - 1
src/view/step-tree-v2/StepTree.vue

@@ -67,7 +67,7 @@ const props = withDefaults(
     lineColor?: string;
     lineColor?: string;
   }>(),
   }>(),
   {
   {
-    margin: () => [10, 10],
+    margin: () => [15, 15],
   }
   }
 );
 );
 
 

+ 1 - 1
src/view/step-tree-v2/example/example.vue

@@ -11,7 +11,7 @@
     </select>
     </select>
   </div>
   </div>
   <div class="tree-cont-wrap" ref="treeWrapRef">
   <div class="tree-cont-wrap" ref="treeWrapRef">
-    <StepTree :data="items[activeNdx].steps" :margin="[25, 25]" lineColor="#89beb2">
+    <StepTree :data="items[activeNdx].steps" :margin="[85, 85]" lineColor="#89beb2">
       <template #step="{ data, start }">
       <template #step="{ data, start }">
         <Step
         <Step
           :item="data"
           :item="data"

+ 5 - 1
src/view/step-tree-v2/helper-v2.ts

@@ -137,10 +137,14 @@ const setGroupBack = <T>(
     const childSteps = children.map((raw) =>
     const childSteps = children.map((raw) =>
       steps.find((step) => raw === step.raw)
       steps.find((step) => raw === step.raw)
     );
     );
+    const bound = getStepsBound(childSteps);
+    const padding = 10;
+    bound.y -= padding;
+    bound.h += 2 * padding;
     ctx.groupBoxs.push({
     ctx.groupBoxs.push({
       step: groupStep,
       step: groupStep,
       line: [],
       line: [],
-      bound: getStepsBound(childSteps),
+      bound: bound,
     });
     });
     groupStep.box.offset.x = -maxWidth + (maxWidth - groupStep.box.size.w) / 2;
     groupStep.box.offset.x = -maxWidth + (maxWidth - groupStep.box.size.w) / 2;
   }
   }