liwei 1 سال پیش
والد
کامیت
f3be374127
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      src/modules/editor/components/CompUI/basicUI/Line/component.tsx

+ 4 - 4
src/modules/editor/components/CompUI/basicUI/Line/component.tsx

@@ -29,10 +29,10 @@ export const Component = defineComponent({
 
         const ctx = canvasRef.value?.getContext("2d") as CanvasRenderingContext2D;
 
-        const width = data.layout.size[0] *2;
-        const height = data.layout.size[1] *2;
-        canvas.width = Math.ceil(Math.max(1, width));
-        canvas.height = Math.ceil(Math.max(1, height));
+        const width =  Math.ceil(Math.max(1, data.layout.size[0] *1.5));
+        const height = Math.ceil(Math.max(1, data.layout.size[1] *1.5));
+        canvas.width = width
+        canvas.height = height
         ctx.clearRect(0, 0, canvas.width, canvas.height);
         ctx.lineWidth = data.value.lineWidth;
         ctx.strokeStyle = data.value.lineColor;