Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -223,9 +223,19 @@ export class LassoCutoutCommand extends CompositeCommand {
|
|||||||
await clearSelectionCmd.execute();
|
await clearSelectionCmd.execute();
|
||||||
this.executedCommands.push(clearSelectionCmd);
|
this.executedCommands.push(clearSelectionCmd);
|
||||||
|
|
||||||
const topLayerIndex = this.layerManager.layers.value.findIndex(
|
const layers = this.layerManager.layers.value;
|
||||||
(layer) => layer.id === this.originalLayer.id
|
var topLayerIndex = 0;
|
||||||
);
|
layers.forEach((layer, index) => {
|
||||||
|
if (layer.id === this.originalLayer.id) {
|
||||||
|
topLayerIndex = index;
|
||||||
|
}else if (layer.children.length > 0) {
|
||||||
|
layer.children.forEach((childLayer) => {
|
||||||
|
if (childLayer.id === this.originalLayer.id) {
|
||||||
|
topLayerIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// const selectLayer = this.layerManager.layers.value[topLayerIndex];
|
// const selectLayer = this.layerManager.layers.value[topLayerIndex];
|
||||||
|
|
||||||
@@ -287,6 +297,7 @@ export class LassoCutoutCommand extends CompositeCommand {
|
|||||||
|
|
||||||
this.groupLayer.children.push(selectLayer);
|
this.groupLayer.children.push(selectLayer);
|
||||||
// 插入新组图层
|
// 插入新组图层
|
||||||
|
console.log("新增套索添加index", topLayerIndex);
|
||||||
this.layerManager.layers.value.splice(topLayerIndex, 0, this.groupLayer);
|
this.layerManager.layers.value.splice(topLayerIndex, 0, this.groupLayer);
|
||||||
|
|
||||||
this.layerManager.activeLayerId.value = selectLayer.id; // 设置新组图层为活动图层
|
this.layerManager.activeLayerId.value = selectLayer.id; // 设置新组图层为活动图层
|
||||||
|
|||||||
Reference in New Issue
Block a user