bill 1 settimana fa
parent
commit
148d9b4e5e

+ 7 - 7
public/icons/CombinationSofa.svg

@@ -1,9 +1,9 @@
 <svg width="3746" height="2084" viewBox="0 0 3746 2084" fill="none" xmlns="http://www.w3.org/2000/svg">
-<ellipse cx="1352" cy="1632" rx="700" ry="350" stroke="black" stroke-width="4"/>
-<rect x="2" y="2" width="2700" height="900" rx="80" stroke="black" stroke-width="4"/>
-<path d="M902 162V902" stroke="black" stroke-width="4"/>
-<path d="M1802 162V902" stroke="black" stroke-width="4"/>
-<path d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L2622 2.0001C2666.18 2.0001 2702 37.8173 2702 82.0001V671.999C2702 716.182 2666.18 751.999 2622 751.999C2577.82 751.999 2542 716.182 2542 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z" stroke="black" stroke-width="4"/>
-<rect x="2844" y="1182" width="900" height="900" rx="80" stroke="black" stroke-width="4"/>
-<path d="M3074 1182L3664 1182C3708.18 1182 3744 1217.82 3744 1262L3744 2002C3744 2046.18 3708.18 2082 3664 2082L3074 2082C3029.82 2082 2994 2046.18 2994 2002C2994 1957.82 3029.82 1922 3074 1922L3584 1922L3584 1342L3074 1342C3029.82 1342 2994 1306.18 2994 1262C2994 1217.82 3029.82 1182 3074 1182Z" stroke="black" stroke-width="4"/>
+<ellipse cx="1352" cy="1632" rx="700" ry="350" stroke="black" />
+<rect x="2" y="2" width="2700" height="900" rx="80" stroke="black" />
+<path d="M902 162V902" stroke="black" />
+<path d="M1802 162V902" stroke="black" />
+<path d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L2622 2.0001C2666.18 2.0001 2702 37.8173 2702 82.0001V671.999C2702 716.182 2666.18 751.999 2622 751.999C2577.82 751.999 2542 716.182 2542 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z" stroke="black" />
+<rect x="2844" y="1182" width="900" height="900" rx="80" stroke="black" />
+<path d="M3074 1182L3664 1182C3708.18 1182 3744 1217.82 3744 1262L3744 2002C3744 2046.18 3708.18 2082 3664 2082L3074 2082C3029.82 2082 2994 2046.18 2994 2002C2994 1957.82 3029.82 1922 3074 1922L3584 1922L3584 1342L3074 1342C3029.82 1342 2994 1306.18 2994 1262C2994 1217.82 3029.82 1182 3074 1182Z" stroke="black" />
 </svg>

File diff suppressed because it is too large
+ 9 - 4
public/icons/CurvedSofa.svg


+ 5 - 3
public/icons/SingleSofa.svg

@@ -1,4 +1,6 @@
 <svg width="904" height="904" viewBox="0 0 904 904" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="2" y="2" width="900" height="900" rx="80" stroke="black" stroke-width="4"/>
-<path d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L822 2.0001C866.183 2.0001 902 37.8173 902 82.0001V671.999C902 716.182 866.183 751.999 822 751.999C777.817 751.999 742 716.182 742 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z" stroke="black" stroke-width="4"/>
-</svg>
+    <rect x="2" y="2" width="900" height="900" rx="80" stroke="black" />
+    <path
+        d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L822 2.0001C866.183 2.0001 902 37.8173 902 82.0001V671.999C902 716.182 866.183 751.999 822 751.999C777.817 751.999 742 716.182 742 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z"
+        stroke="black"  />
+</svg>

+ 4 - 4
public/icons/ThreeSofa.svg

@@ -1,6 +1,6 @@
 <svg width="2704" height="904" viewBox="0 0 2704 904" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="2" y="2" width="2700" height="900" rx="80" stroke="black" stroke-width="4"/>
-<path d="M902 162V902" stroke="black" stroke-width="4"/>
-<path d="M1802 162V902" stroke="black" stroke-width="4"/>
-<path d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L2622 2.0001C2666.18 2.0001 2702 37.8173 2702 82.0001V671.999C2702 716.182 2666.18 751.999 2622 751.999C2577.82 751.999 2542 716.182 2542 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z" stroke="black" stroke-width="4"/>
+<rect x="2" y="2" width="2700" height="900" rx="80" stroke="black" />
+<path d="M902 162V902" stroke="black" />
+<path d="M1802 162V902" stroke="black" />
+<path d="M2 671.999V82C2 37.8173 37.8171 2.00006 81.9999 2L2622 2.0001C2666.18 2.0001 2702 37.8173 2702 82.0001V671.999C2702 716.182 2666.18 751.999 2622 751.999C2577.82 751.999 2542 716.182 2542 671.999V162H162V671.999C162 716.182 126.183 751.999 82 751.999C37.8172 751.999 2 716.182 2 671.999Z" stroke="black" />
 </svg>

+ 4 - 4
public/icons/TwoSofa.svg

@@ -1,5 +1,5 @@
-<svg width="1808" height="908" viewBox="0 0 1808 908" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="2" y="2" width="1804" height="904" rx="80" stroke="black" stroke-width="4"/>
-<path d="M904 164V904" stroke="black" stroke-width="4"/>
-<path d="M4 673.999V84C4 39.8173 39.8171 4.00006 83.9999 4L1724 4.0001C1768.18 4.0001 1804 39.8173 1804 84.0001V673.999C1804 718.182 1768.18 753.999 1724 753.999C1679.82 753.999 1644 718.182 1644 673.999V164H164V673.999C164 718.182 128.183 753.999 84 753.999C39.8172 753.999 4 718.182 4 673.999Z" stroke="black" stroke-width="4"/>
+<svg width="1805" height="905" viewBox="0 0 1805 905" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="1804" height="904" rx="80" stroke="black"/>
+<path d="M902.5 162.5V902.5" stroke="black"/>
+<path d="M2.5 672.499V82.5C2.5 38.3173 38.3171 2.50006 82.4999 2.5L1722.5 2.5001C1766.68 2.5001 1802.5 38.3173 1802.5 82.5001V672.499C1802.5 716.682 1766.68 752.499 1722.5 752.499C1678.32 752.499 1642.5 716.682 1642.5 672.499V162.5H162.5V672.499C162.5 716.682 126.683 752.499 82.5 752.499C38.3172 752.499 2.5 716.682 2.5 672.499Z" stroke="black"/>
 </svg>

+ 3 - 3
public/icons/chuang.svg

@@ -1,4 +1,4 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0.5 12.5H31.5V19.5H0.5V12.5Z" stroke="black"/>
-<path d="M0.5 16H31.5" stroke="black"/>
+<svg width="601" height="137" viewBox="0 0 601 137" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 0.5H600.5V136.5H0.5V0.5Z" stroke="#333333"/>
+<path d="M0.5 68.5H600.5" stroke="#333333"/>
 </svg>

+ 18 - 18
public/icons/loudao.svg

@@ -1,19 +1,19 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.5 2.5L29.5 2.5V29.5H2.5V2.5Z" stroke="black"/>
-<path d="M14.5 2.5V29.5" stroke="black"/>
-<path d="M17.5 2.5V29.5" stroke="black"/>
-<path d="M17.6337 5.5H29.6337" stroke="black"/>
-<path d="M17.6337 8.5H29.6337" stroke="black"/>
-<path d="M17.6337 11.5H29.6337" stroke="black"/>
-<path d="M17.6337 14.5H29.6337" stroke="black"/>
-<path d="M17.6337 17.5H29.6337" stroke="black"/>
-<path d="M17.6337 20.5H29.6337" stroke="black"/>
-<path d="M17.6337 23.5H29.6337" stroke="black"/>
-<path d="M2.49994 8.5H14.4999" stroke="black"/>
-<path d="M2.49994 11.5H14.4999" stroke="black"/>
-<path d="M2.49994 14.5H14.4999" stroke="black"/>
-<path d="M2.49994 17.5H14.4999" stroke="black"/>
-<path d="M2.49994 20.5H14.4999" stroke="black"/>
-<path d="M2.49994 23.5H14.4999" stroke="black"/>
-<path d="M2.49994 26.5H14.4999" stroke="black"/>
+<svg width="1201" height="1201" viewBox="0 0 1201 1201" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 0.5L1194.57 0.5V1200.5H0.5V0.5Z" stroke="#333333"/>
+<path d="M531.178 0.5V1200.5" stroke="#333333"/>
+<path d="M663.858 0.5V1200.5" stroke="#333333"/>
+<path d="M669.802 133.836H1200.5" stroke="#333333"/>
+<path d="M669.802 267.168H1200.5" stroke="#333333"/>
+<path d="M669.802 400.5H1200.5" stroke="#333333"/>
+<path d="M669.802 533.832H1200.5" stroke="#333333"/>
+<path d="M669.802 667.168H1200.5" stroke="#333333"/>
+<path d="M669.802 800.5H1200.5" stroke="#333333"/>
+<path d="M669.802 933.836H1200.5" stroke="#333333"/>
+<path d="M0.497408 267.168H531.193" stroke="#333333"/>
+<path d="M0.497408 400.5H531.193" stroke="#333333"/>
+<path d="M0.497408 533.832H531.193" stroke="#333333"/>
+<path d="M0.497408 667.168H531.193" stroke="#333333"/>
+<path d="M0.497408 800.5H531.193" stroke="#333333"/>
+<path d="M0.497408 933.836H531.193" stroke="#333333"/>
+<path d="M0.497408 1067.17H531.193" stroke="#333333"/>
 </svg>

+ 22 - 22
public/icons/luodichuang.svg

@@ -1,23 +1,23 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0.5 16H31.5" stroke="black"/>
-<path d="M6 19H8" stroke="black"/>
-<path d="M3 19H5" stroke="black"/>
-<path d="M2 13H0.5V19H2" stroke="black"/>
-<path d="M30 13H31.5V19H30" stroke="black"/>
-<path d="M9 19H11" stroke="black"/>
-<path d="M12 19H14" stroke="black"/>
-<path d="M15 19H17" stroke="black"/>
-<path d="M18 19H20" stroke="black"/>
-<path d="M21 19H23" stroke="black"/>
-<path d="M24 19H26" stroke="black"/>
-<path d="M27 19H29" stroke="black"/>
-<path d="M6 13H8" stroke="black"/>
-<path d="M3 13H5" stroke="black"/>
-<path d="M9 13H11" stroke="black"/>
-<path d="M12 13H14" stroke="black"/>
-<path d="M15 13H17" stroke="black"/>
-<path d="M18 13H20" stroke="black"/>
-<path d="M21 13H23" stroke="black"/>
-<path d="M24 13H26" stroke="black"/>
-<path d="M27 13H29" stroke="black"/>
+<svg width="2401" height="465" viewBox="0 0 2401 465" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 232.5H2400.5" stroke="#333333"/>
+<path d="M426.307 464.5H581.145" stroke="#333333"/>
+<path d="M194.049 464.5H348.888" stroke="#333333"/>
+<path d="M116.629 0.5H0.5V464.5H116.629" stroke="#333333"/>
+<path d="M2284.37 0.5H2400.5V464.5H2284.37" stroke="#333333"/>
+<path d="M658.564 464.5H813.403" stroke="#333333"/>
+<path d="M890.822 464.5H1045.66" stroke="#333333"/>
+<path d="M1123.08 464.5H1277.92" stroke="#333333"/>
+<path d="M1355.34 464.5H1510.18" stroke="#333333"/>
+<path d="M1587.6 464.5H1742.44" stroke="#333333"/>
+<path d="M1819.85 464.5H1974.69" stroke="#333333"/>
+<path d="M2052.11 464.5H2206.95" stroke="#333333"/>
+<path d="M426.307 0.5H581.145" stroke="#333333"/>
+<path d="M194.049 0.5H348.888" stroke="#333333"/>
+<path d="M658.564 0.5H813.403" stroke="#333333"/>
+<path d="M890.822 0.5H1045.66" stroke="#333333"/>
+<path d="M1123.08 0.5H1277.92" stroke="#333333"/>
+<path d="M1355.34 0.5H1510.18" stroke="#333333"/>
+<path d="M1587.6 0.5H1742.44" stroke="#333333"/>
+<path d="M1819.85 0.5H1974.69" stroke="#333333"/>
+<path d="M2052.11 0.5H2206.95" stroke="#333333"/>
 </svg>

+ 3 - 3
public/icons/men_l.svg

@@ -1,4 +1,4 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M27.5 25.5C27.5 24.5 26 16 19.9999 11.5C13.9999 7.00005 8.00007 7 6.5 7" stroke="black"/>
-<path d="M6.5 7.00003H4.5V25H6.5L6.5 7.00003Z" stroke="black"/>
+<svg width="801" height="645" viewBox="0 0 801 645" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M800.5 644.5C800.5 609.689 748.357 313.797 539.782 157.149C331.211 0.501743 122.645 0.5 70.5 0.5" stroke="#333333"/>
+<path d="M70.5 0.5H0.5V644.5H70.5V0.5Z" stroke="#333333"/>
 </svg>

+ 3 - 3
public/icons/piaochuang.svg

@@ -1,4 +1,4 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0.5 8V23.5H31.5V8H0.5Z" stroke="black"/>
-<path d="M2.5 23.5V10H29.5V23.5" stroke="black"/>
+<svg width="1501" height="751" viewBox="0 0 1501 751" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 0.5V750.5H1500.5V0.5H0.5Z" stroke="#333333"/>
+<path d="M97.5 750.5V97.5H1403.5V750.5" stroke="#333333"/>
 </svg>

+ 4 - 4
public/icons/shuangkaimen.svg

@@ -1,5 +1,5 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M29.5 7H31.5V25H29.5L29.5 7Z" stroke="black"/>
-<path d="M0.5 7H2.5V25H0.5L0.5 7Z" stroke="black"/>
-<path d="M2.5 7C6 7 10 8.78571 12.5 12C15 15.2143 16 19.5 16 19.5C16 19.5 17 15 19.5 12C22 9 26 7 29.5 7" stroke="black"/>
+<svg width="1501" height="872" viewBox="0 0 1501 872" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1403.5 0.5H1500.5V871.5H1403.5V0.5Z" stroke="#333333"/>
+<path d="M0.5 0.5H97.5V871.5H0.5V0.5Z" stroke="#333333"/>
+<path d="M97.2744 0.5C266.629 0.5 460.178 86.9053 581.145 242.435C702.113 397.966 750.5 605.339 750.5 605.339C750.5 605.339 798.887 387.597 919.855 242.435C1040.82 97.2742 1234.37 0.5 1403.73 0.5" stroke="#333333"/>
 </svg>

+ 14 - 14
public/icons/yakou.svg

@@ -1,15 +1,15 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M31.5 11.5L0.5 11.5002V20.5L31.5 20.5V11.5Z" stroke="black"/>
-<path d="M9 14.5H11" stroke="black"/>
-<path d="M5 14.5H7" stroke="black"/>
-<path d="M13 14.5H15" stroke="black"/>
-<path d="M17 14.5H19" stroke="black"/>
-<path d="M21 14.5H23" stroke="black"/>
-<path d="M25 14.5H27" stroke="black"/>
-<path d="M9 17.5H11" stroke="black"/>
-<path d="M5 17.5H7" stroke="black"/>
-<path d="M13 17.5H15" stroke="black"/>
-<path d="M17 17.5H19" stroke="black"/>
-<path d="M21 17.5H23" stroke="black"/>
-<path d="M25 17.5H27" stroke="black"/>
+<svg width="1101" height="321" viewBox="0 0 1101 321" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1100.5 0.5L0.5 0.507121V320.5H1100.5V0.5Z" stroke="#333333"/>
+<path d="M302.113 107.166H373.081" stroke="#333333"/>
+<path d="M160.178 107.166H231.145" stroke="#333333"/>
+<path d="M444.049 107.166H515.017" stroke="#333333"/>
+<path d="M585.984 107.166H656.952" stroke="#333333"/>
+<path d="M727.919 107.166H798.887" stroke="#333333"/>
+<path d="M869.854 107.166H940.822" stroke="#333333"/>
+<path d="M302.113 213.832H373.081" stroke="#333333"/>
+<path d="M160.178 213.832H231.145" stroke="#333333"/>
+<path d="M444.049 213.832H515.017" stroke="#333333"/>
+<path d="M585.984 213.832H656.952" stroke="#333333"/>
+<path d="M727.919 213.832H798.887" stroke="#333333"/>
+<path d="M869.854 213.832H940.822" stroke="#333333"/>
 </svg>

+ 4 - 4
public/icons/yandao.svg

@@ -1,5 +1,5 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.5 2.5H29.5V29.5H2.5V2.5Z" stroke="black"/>
-<path d="M4.5 4.5H27.5V27.5H4.50001L4.5 4.5Z" stroke="black"/>
-<path d="M4.5 4.5L22.5 9.5L27.5 27.5" stroke="black"/>
+<svg width="301" height="301" viewBox="0 0 301 301" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M22.7227 22.7227L222.723 78.2782L278.278 278.278" stroke="#333333"/>
+<path d="M0.5 0.5L300.5 0.5V300.5H0.5V0.5Z" stroke="#333333"/>
+<path d="M22.7227 22.7227H278.278L278.278 278.278H22.7228L22.7227 22.7227Z" stroke="#333333"/>
 </svg>

+ 3 - 3
public/icons/yimen.svg

@@ -1,4 +1,4 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13.5 16H31.5L31.5001 18H13.5001L13.5 16Z" stroke="black"/>
-<path d="M0.5 14H18.5L18.5001 16H0.500068L0.5 14Z" stroke="black"/>
+<svg width="1601" height="207" viewBox="0 0 1601 207" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M671.5 103.5H1600.49L1600.5 206.5H671.505L671.5 103.5Z" stroke="#333333"/>
+<path d="M0.5 0.5H929.495L929.5 103.5H0.50351L0.5 0.5Z" stroke="#333333"/>
 </svg>

+ 4 - 4
public/icons/zhuzi.svg

@@ -1,5 +1,5 @@
-<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.5 2.5H29.5V29.5H2.5V2.5Z" stroke="black"/>
-<path d="M2.5 2.5L29.5 29.5" stroke="black"/>
-<path d="M29.5 2.5L2.5 29.5" stroke="black"/>
+<svg width="401" height="401" viewBox="0 0 401 401" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0.5 0.5L400.5 400.5" stroke="#333333"/>
+<path d="M400.5 0.5L0.500007 400.5" stroke="#333333"/>
+<path d="M0.5 0.5L400.5 0.5V400.5H0.5V0.5Z" stroke="#333333"/>
 </svg>

+ 20 - 8
src/core/hook/use-dxf.ts

@@ -45,7 +45,7 @@ import { Line } from "konva/lib/shapes/Line";
 import { DrawItem } from "../components";
 import { PolygonData } from "../components/polygon";
 import { getBaseItem } from "../components/util";
-import { defaultStyle as defaultArrowStyle } from '../components/arrow'
+import { defaultStyle as defaultArrowStyle } from "../components/arrow";
 
 export const useGetDXF = () => {
   const store = useStore();
@@ -245,8 +245,12 @@ export const useGetDXF = () => {
       await asyncTimeout(50);
     };
 
-    const drawItem = async (_item: DrawItem, type = store.getType(_item.id)) => {
+    const drawItem = async (
+      _item: DrawItem,
+      type = store.getType(_item.id),
+    ) => {
       if (_item.hide) return;
+      const iconScale = 8;
       let item;
       let mat;
       switch (type) {
@@ -331,18 +335,18 @@ export const useGetDXF = () => {
                   points: linePoints,
                   attitude: new Transform().m,
                 };
-                await drawItem(lineData, 'polygon');
+                await drawItem(lineData, "polygon");
               }
               const arrowData: ArrowData = {
                 ...getBaseItem(),
                 ...defaultArrowStyle,
-                
+
                 ...item,
                 points: points.slice(points.length - 2),
                 attitude: new Transform().m,
               };
-              console.log(arrowData)
-              await drawItem(arrowData, 'arrow')
+              console.log(arrowData);
+              await drawItem(arrowData, "arrow");
             }
           }
           break;
@@ -434,10 +438,13 @@ export const useGetDXF = () => {
             .findOne<Group>(`#${iconItem.id}`)!
             .findOne<Group>(".rep-position")!;
 
-          await writeImage(pathGroup, () => {
+          await writeImage(pathGroup, (scale) => {
+            const oldSW = iconItem.strokeWidth;
+            iconItem.strokeWidth = (iconItem.strokeWidth || 1) * scale.width * 1.5;
             iconItem.strokeScaleEnabled = true;
             return () => {
               iconItem.strokeScaleEnabled = false;
+              iconItem.strokeWidth = oldSW;
             };
           });
           break;
@@ -447,10 +454,15 @@ export const useGetDXF = () => {
             .findOne<Group>(`#${lineIconItem.id}`)!
             .findOne<Group>(".rep-position")!;
 
-          await writeImage(linePathGroup, () => {
+          await writeImage(linePathGroup, (scale) => {
+            const oldSW = lineIconItem.strokeWidth;
+            lineIconItem.strokeWidth =
+              (lineIconItem.strokeWidth || 1) * scale.width* 1.5;
             lineIconItem.strokeScaleEnabled = true;
+            // lineIconItem.stroke
             return () => {
               lineIconItem.strokeScaleEnabled = false;
+              lineIconItem.strokeWidth = oldSW;
             };
           });
           break;

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

@@ -88,7 +88,7 @@ export const useAutoPaste = () => {
           );
           drawAPI.addShape(
             "icon",
-            { ...style, fill: undefined, stroke: undefined },
+            { ...style },
             pos,
             true,
             true,

+ 3 - 1
src/example/fuse/views/tabulation/gen-tab.ts

@@ -24,6 +24,7 @@ import { getEmptyStoreData, StoreData } from "@/core/store/store";
 import { defaultLayer } from "@/constant";
 import { getIconStyle, IconData } from "@/core/components/icon";
 import { defaultStyle as defaultTableStyle } from "@/core/components/table";
+import { defaultStyle as defaultTextStyle } from "@/core/components/text";
 import { MathUtils } from "three";
 import {
   getCurrentNdxRaw,
@@ -215,6 +216,7 @@ export const genTabulationData = async (
   const getTitle = () => {
     const title = {
       ...getBaseItem(),
+      ...defaultTextStyle,
       content: temp.title,
       width: size.width - margin[1] - margin[3],
       heihgt: getRealPixel(14.4, paperKey),
@@ -300,7 +302,7 @@ export const genTabulationData = async (
         radiusX: 1,
         desc: shape.desc || "",
         radiusY: 1,
-      };
+      } as any;
       const radius = (getSerialFontW(s) * Math.sqrt(2)) / 2;
       s.radiusX = s.radiusY = radius;
       serials.push(s);

+ 4 - 1
src/example/fuse/views/tabulation/index.vue

@@ -223,6 +223,10 @@ const setMapHandler = async (config: { url: string; size: Size }) => {
         desc,
       };
     });
+    if (syncSerials.length) {
+      syncSerials.sort((a, b) => Number(a.content) - Number(b.content));
+    }
+
 
     // 找出没有关联的痕迹物证
     const images = [...(overview.image || []), ...(overview.icon || [])];
@@ -255,7 +259,6 @@ const setMapHandler = async (config: { url: string; size: Size }) => {
     }
 
     if (syncSerials.length) {
-      syncSerials.sort((a, b) => Number(a.content) - Number(b.content));
       draw.value?.runHook(() => syncTable(table, syncSerials));
     }
     if (serialTable.value) {

+ 6 - 6
src/lang/locales/en.json

@@ -126,8 +126,8 @@
       "Pillow": "Pillow",
       "Plant": "Plant",
       "PullGate": "RetrGate",
-      "RevolutionDoor": "RevolvDoor",
-      "RollerShutter": "RollerDoor",
+      "RevolutionDoor": "RevDoor",
+      "RollerShutter": "RollDoor",
       "Shower": "Shower",
       "SideTableR": "RndSide",
       "SideTableS": "SqSide",
@@ -372,11 +372,11 @@
     "ztop": "Bring to front"
   },
   "tableTemp": {
-    "th1": "Incident date",
-    "th2": "Incident location",
-    "th3": "Drawing unit",
+    "th1": "Date",
+    "th2": "Place",
+    "th3": "Unit",
     "th4": "Drafter",
-    "th5": "Drawing time",
+    "th5": "Time",
     "title": "Scene floor plan of \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "Default title",
     "title2": "Drawing description"

+ 5 - 5
src/lang/locales/es.json

@@ -372,11 +372,11 @@
     "ztop": "Traer al frente"
   },
   "tableTemp": {
-    "th1": "Fecha del incidente",
-    "th2": "Lugar del incidente",
-    "th3": "Unidad de dibujo",
-    "th4": "Dibujante",
-    "th5": "Hora del dibujo",
+    "th1": "Fecha",
+    "th2": "Lugar",
+    "th3": "Unidad",
+    "th4": "Dibuj",
+    "th5": "Hora",
     "title": "Plano de escena de \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "Título predeterminado",
     "title2": "Descripción del dibujo"

+ 5 - 5
src/lang/locales/fr.json

@@ -372,11 +372,11 @@
     "ztop": "Amener au premier plan"
   },
   "tableTemp": {
-    "th1": "Date de l'incident",
-    "th2": "Lieu de l'incident",
-    "th3": "Unité de dessin",
-    "th4": "Dessinateur",
-    "th5": "Heure du dessin",
+    "th1": "Date",
+    "th2": "Lieu",
+    "th3": "Unité",
+    "th4": "Dessin",
+    "th5": "Heure",
     "title": "Plan de scène de \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "Titre par défaut",
     "title2": "Description du dessin"

+ 3 - 3
src/lang/locales/ja.json

@@ -373,10 +373,10 @@
   },
   "tableTemp": {
     "th1": "発生日",
-    "th2": "発生場所",
-    "th3": "作図単位",
+    "th2": "場所",
+    "th3": "部署",
     "th4": "作図者",
-    "th5": "作図時間",
+    "th5": "時間",
     "title": "「{crimeTimeBegin}」{caseLocation}{caseTypeName}現場平面略図",
     "title1": "デフォルトタイトル",
     "title2": "作図説明"

+ 3 - 3
src/lang/locales/ko.json

@@ -373,10 +373,10 @@
   },
   "tableTemp": {
     "th1": "발생일",
-    "th2": "발생 장소",
-    "th3": "작도 단위",
+    "th2": "장소",
+    "th3": "부서",
     "th4": "작도자",
-    "th5": "작도 시간",
+    "th5": "시간",
     "title": "\"{crimeTimeBegin}\" {caseLocation}{caseTypeName} 현장 평면도",
     "title1": "기본 제목",
     "title2": "작도 설명"

+ 5 - 5
src/lang/locales/pt.json

@@ -372,11 +372,11 @@
     "ztop": "Trazer para a frente"
   },
   "tableTemp": {
-    "th1": "Data do incidente",
-    "th2": "Local do incidente",
-    "th3": "Unidade de desenho",
-    "th4": "Desenhista",
-    "th5": "Hora do desenho",
+    "th1": "Data",
+    "th2": "Local",
+    "th3": "Unid",
+    "th4": "Desenh",
+    "th5": "Hora",
     "title": "Esboço da cena \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "Título padrão",
     "title2": "Descrição do desenho"

+ 5 - 5
src/lang/locales/ru.json

@@ -372,11 +372,11 @@
     "ztop": "На передний план"
   },
   "tableTemp": {
-    "th1": "Дата происшествия",
-    "th2": "Место происшествия",
-    "th3": "Подразделение",
-    "th4": "Чертёжник",
-    "th5": "Время создания",
+    "th1": "Дата",
+    "th2": "Место",
+    "th3": "Подраз",
+    "th4": "Чертил",
+    "th5": "Время",
     "title": "Схема места происшествия \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "Заголовок по умолчанию",
     "title2": "Описание чертежа"

+ 4 - 4
src/lang/locales/th.json

@@ -372,11 +372,11 @@
     "ztop": "นำมาด้านหน้า"
   },
   "tableTemp": {
-    "th1": "วันที่เกิดเหตุ",
-    "th2": "สถานที่เกิดเหตุ",
-    "th3": "หน่วยงานที่วาด",
+    "th1": "วันที่",
+    "th2": "สถานที่",
+    "th3": "หน่วย",
     "th4": "ผู้วาด",
-    "th5": "เวลาที่วาด",
+    "th5": "เวลา",
     "title": "แผนผังสถานที่เกิดเหตุ \"{crimeTimeBegin}\" {caseLocation}{caseTypeName}",
     "title1": "ชื่อเริ่มต้น",
     "title2": "คำอธิบายภาพวาด"