|
@@ -315,7 +315,7 @@ import { defaultPureColor } from '@/services/defaults';
|
|
|
import { useEnterprise } from '@/services/enterprise';
|
|
|
import { MoreIcon, CloseIcon, EllipsisIcon} from 'tdesign-icons-vue-next';
|
|
|
import { useMeta2dData,useExtendData } from '@/services/common';
|
|
|
-import { lineCross,clearLineCross } from '@meta2d/utils';
|
|
|
+import { lineCross,clearLineCross,handleLineCross } from '@meta2d/utils';
|
|
|
|
|
|
const { getEnterprise } = useEnterprise();
|
|
|
const { meta2dData, setMeta2dData } = useMeta2dData();
|
|
@@ -482,6 +482,7 @@ const changeLineIntersect = (e:any)=>{
|
|
|
setExtendData('lineIntersect',e);
|
|
|
if(e){
|
|
|
lineCross(true);
|
|
|
+ handleLineCross(meta2d.store.active.length>0);
|
|
|
}else{
|
|
|
clearLineCross();
|
|
|
}
|
|
@@ -509,6 +510,7 @@ onMounted(() => {
|
|
|
}
|
|
|
openData();
|
|
|
meta2d.on('opened', openData);
|
|
|
+ meta2d.on('add', finishLine);
|
|
|
if(extendData.lineIntersect){
|
|
|
lineCross(true);
|
|
|
}
|
|
@@ -516,6 +518,7 @@ onMounted(() => {
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
meta2d.off('opened', openData);
|
|
|
+ meta2d.off('add', finishLine);
|
|
|
setTimeout(()=>{
|
|
|
clearLineCross();
|
|
|
},2000);
|
|
@@ -536,7 +539,13 @@ function openData() {
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+function finishLine(e) {
|
|
|
+ setTimeout(()=>{
|
|
|
+ if(e[0].type === 1 && e[0].name === 'line' && ['line',"polyline"].indexOf(e[0].lineName) !== -1){
|
|
|
+ extendData.lineIntersect && handleLineCross(meta2d.store.active.length>0);
|
|
|
+ }
|
|
|
+ },500)
|
|
|
+}
|
|
|
const showInitFnDialog = () => {
|
|
|
initFnDialog.data = meta2d.store.data.initJs;
|
|
|
initFnDialog.show = true;
|