bill 2 kuukautta sitten
vanhempi
commit
bea20d1e0b
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1 1
      src/core/components/icon/index.ts
  2. 2 2
      src/core/hook/use-expose.ts

+ 1 - 1
src/core/components/icon/index.ts

@@ -54,7 +54,7 @@ export const getMouseStyle = (data: IconData) => {
 
 export type IconData = Partial<typeof defaultStyle> &
   BaseItem & Size & {
-    fill?: string;
+    fill?: string | null;
     stroke?: string;
     name?: string
     strokeWidth?: number;

+ 2 - 2
src/core/hook/use-expose.ts

@@ -48,7 +48,7 @@ export const useAutoPaste = () => {
         console.log(val);
         if (isSvgString(val)) {
           const url = await resourceHandler(val, "svg");
-          drawAPI.addShape("icon", { url, stroke: themeColor }, pos, true);
+          drawAPI.addShape("icon", { url, stroke: themeColor, fill: null }, pos, true);
         } else {
           drawAPI.addShape("text", { content: val }, pos, true);
         }
@@ -59,7 +59,7 @@ export const useAutoPaste = () => {
       async handler(pos, val, type) {
         const url = await resourceHandler(val, type);
         if (type.includes("svg")) {
-          drawAPI.addShape("icon", { url, stroke: themeColor }, pos, true);
+          drawAPI.addShape("icon", { url, stroke: themeColor, fill: null }, pos, true);
         } else {
           const image = await getImage(url);
           drawAPI.addShape(