Browse Source

添加多边形

liwei 1 year ago
parent
commit
d310991cdc

+ 6 - 0
src/modules/editor/components/CompUI/basicUI/QuadraticCurve/component.tsx

@@ -52,6 +52,12 @@ export const Component = defineComponent({
             ctx.fillStyle = bColor;
             ctx.fill();
         }
+
+        if (store.isEditMode) {
+            ctx.fillStyle = 'red';
+            // start point
+            ctx.fillRect(width * data.value.cp1-5, 0, 10, 10);
+        }
     }
 
     

+ 2 - 2
src/modules/editor/components/CompUI/basicUI/QuadraticCurve/index.ts

@@ -78,8 +78,8 @@ export const Form = createAttrsForm([
     component: Slider,
     props: {
         defaultValue: 0.5,
-        min: 0,
-        max: 1,
+        min: -0.5,
+        max: 1.5,
         step: 0.01,
     },
   },