|
@@ -567,12 +567,17 @@ export const onlyVisible2 = (xml: string, partIndexs: Array<any>, resourceType?:
|
|
|
//partListNames.shift();
|
|
|
}
|
|
|
const visiblePartInfo = partList[partIndexs[0]];
|
|
|
- const ids = partIndexs.map(item => partList[item].getAttribute("id"))
|
|
|
+ let ids: any = [];
|
|
|
+ partIndexs.forEach(item => {
|
|
|
+ if (partList[item]) {
|
|
|
+ ids.push(partList[item]?.getAttribute("id"))
|
|
|
+ }
|
|
|
+ })
|
|
|
// console.log(visiblePartInfo, partIndex)
|
|
|
// 根据后台已选择的分轨筛选出能切换的声轨
|
|
|
//state.partListNames = partListNames;
|
|
|
// console.log('分轨名称',state.partListNames)
|
|
|
- if (visiblePartInfo) {
|
|
|
+ if (visiblePartInfo && ids.length) {
|
|
|
const id = visiblePartInfo.getAttribute("id");
|
|
|
Array.from(parts).forEach((part: any) => {
|
|
|
if (part && !ids.includes(part.getAttribute("id")) ) {
|