mirror of
https://gitee.com/hoslay/ddei-editor.git
synced 2025-12-08 01:58:36 +08:00
优化线段寻路逻辑
This commit is contained in:
parent
6b9a15e573
commit
ceac9b0c7c
@ -539,5 +539,31 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
],
|
||||||
|
|
||||||
|
filters: {
|
||||||
|
LINE_OBI_FILTER: (model, params) => {
|
||||||
|
let line = params.line
|
||||||
|
if (line) {
|
||||||
|
|
||||||
|
let distLinks = line.stage.getDistModelLinks(line.id);
|
||||||
|
if (distLinks) {
|
||||||
|
for (let i = 0; i < distLinks.length;i++){
|
||||||
|
if(distLinks[i].sm == model){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//线段的端点如果在图形整个图形的内部,且不为distLinks,则忽略
|
||||||
|
let pvs = [line.startPoint,line.endPoint]
|
||||||
|
for (let i = 0; i < pvs.length; i++) {
|
||||||
|
let lPoint = pvs[i];
|
||||||
|
if (model.isInAreaLoose(lPoint.x, lPoint.y,true)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/App.vue
13
src/App.vue
@ -30,17 +30,18 @@ export default defineComponent({
|
|||||||
}else{
|
}else{
|
||||||
exts = [DDeiExtTooltip,
|
exts = [DDeiExtTooltip,
|
||||||
DDeiExtQuickStyle,
|
DDeiExtQuickStyle,
|
||||||
DDeiCoreCanvasQuickDialog.configuration({
|
DDeiCoreCanvasQuickDialog
|
||||||
changeLevel:{
|
// .configuration({
|
||||||
viewer:QuickStyleDemo
|
// changeLevel:{
|
||||||
}
|
// viewer:QuickStyleDemo
|
||||||
}),
|
// }
|
||||||
|
// }),
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
const options = markRaw({
|
const options = markRaw({
|
||||||
currentLayout: currentLayout,
|
currentLayout: currentLayout,
|
||||||
config: {
|
config: {
|
||||||
ratio: 0.6, //默认缩放比例为120%
|
ratio: 0.7, //默认缩放比例为120%
|
||||||
pixel:2, //调整渲染质量
|
pixel:2, //调整渲染质量
|
||||||
// readonly:true,
|
// readonly:true,
|
||||||
// readonly:1,
|
// readonly:1,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user