You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
maotu-webtopo/webVue/assets/index-fd059ba6.js

2 lines
21 KiB
JavaScript

3 weeks ago
import{_ as A,b0 as le,d as E,c as R,b1 as ee,b2 as pe,b3 as de,o as c,a as g,Q as F,F as O,A as N,P as B,g as G,U as ce,r as V,aU as oe,b as h,h as f,V as T,p as j,n as W,b4 as ue,W as q,aB as me,Z as H,b5 as ve,O as C,i as z,m as X,b6 as Q,aQ as Z,w as K,t as U,b7 as fe,$ as _e,q as ge,M as he,b8 as ye,ba as Je,bb as be,bc as ke,a1 as we,a3 as xe,Y as te}from"./index-9847718b.js";const Ce=A(le,[["__scopeId","data-v-a8334372"]]),Me=["src"],$e=E({__name:"index",props:{symbolId:{},symbolStr:{},width:{},height:{},props:{}},setup(m){const t=m;console.log("svg",t);const e=R(()=>ee(pe(t.symbolId,t.symbolStr,t.width,t.height,de(t.props))));return(n,o)=>(c(),g("img",{class:"w-1/1 h-1/1",src:e.value},null,8,Me))}}),Se={class:"mt-group"},Ee=["id"],De=E({__name:"index",props:{itemJson:{},grid:{},canvasCfg:{},canvasDom:{}},setup(m){F(e=>({cebe1efc:t.itemJson.binfo.left+"px",v233fe8b0:t.itemJson.binfo.top+"px",v37317152:t.itemJson.binfo.width+"px",v39c959e2:t.itemJson.binfo.height+"px"}));const t=m;return(e,n)=>(c(),g("div",Se,[(c(!0),g(O,null,N(t.itemJson.children,o=>(c(),g("div",{class:"absolute",key:o.id,id:o.id,style:B({left:o.binfo.left+"%",top:o.binfo.top+"%",width:o.binfo.width+"%",height:o.binfo.height+"%",transform:`rotate(${o.binfo.angle}deg)`})},[G(ne,{"item-json":o,grid:t.grid,"canvas-cfg":t.canvasCfg,"canvas-dom":t.canvasDom,"lock-state":!1},null,8,["item-json","grid","canvas-cfg","canvas-dom"])],12,Ee))),128))]))}}),Ie=A(De,[["__scopeId","data-v-d359f9ac"]]),Le=["id"],ze=["fill"],Be=["id"],Ue=["fill"],Pe=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],Re=["from","to","dur"],je=["d","stroke-width","marker-start","marker-end"],Ve=["d","stroke","stroke-width","stroke-dasharray"],Te=["from","to","dur"],Oe=["r","fill"],Ne=["path","dur"],Ae={key:2},Ye=["cx","cy","stroke","onMousedown","onTouchstartPassive"],Xe={key:3},Fe=["id","cx","cy","stroke","onMousedown","onTouchstartPassive"],Ge=E({__name:"index",props:{itemJson:{},canvasCfg:{},grid:{},canvasDom:{},doneJson:{},lockState:{type:Boolean},mode:{default:"normal"}},emits:["update:itemJson","setIntention","lineMouseUp"],setup(m,{emit:t}){const e=m,n=t,o=ce.lineRenderOffset;R(()=>!e.grid.align||!e.grid.enabled?1:e.grid.size);const r=V(),d=(i,v,y,k)=>{if(e.lockState)return;if(i.stopPropagation(),e.mode==="line-edit"&&y=="edit"&&v!==0&&v!==e.itemJson.props.point_position.val.length-1){const _=e.itemJson.props.point_position.val;_.splice(v,1),n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:_}}});return}const{x,y:I}=k,L=i instanceof MouseEvent?i.clientX:i.touches[0].pageX,P=i instanceof MouseEvent?i.clientY:i.touches[0].pageY;let $=0,S=0,J=!0;const w=_=>{const s=_ instanceof MouseEvent?_.clientX:_.touches[0].pageX,u=_ instanceof MouseEvent?_.clientY:_.touches[0].pageY,l=i.ctrlKey?0:q((s-L)/e.canvasCfg.scale,1),D=i.shiftKey?0:q((u-P)/e.canvasCfg.scale,1);if($=x+l,S=I+D,y==="add")if(k.x=$,k.y=S,J){const a=e.itemJson.props.point_position.val;a.splice(v+1,0,{x:$,y:S}),n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:a}}}),J=!1}else{const a=e.itemJson.props.point_position.val;a[v+1]={x:$,y:S},n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:a}}})}if(y==="edit"){const a=e.itemJson.props.point_position.val;if(v===0){if(n("setIntention","adsorbStart"),e.mode==="line-edit"&&J){const b=e.itemJson.props.point_position.val;b.unshift({x:$,y:S}),n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:b}}}),J=!1;return}}else if(v===a.length-1&&(n("setIntention","adsorbEnd"),e.mode==="line-edit"&&J)){const b=e.itemJson.props.point_position.val;b.push({x:$,y:S}),n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJson.props.point_position,val:b}}}),v+=1,J=!1;return}a[v].x=$,a[v].y=S,n("update:itemJson",{...e.itemJson,props:{...e.itemJson.props,point_position:{...e.itemJ