hotfix for putting the interactions on the component cards

the interactions are loading and being added correctly but when determining which card to display the interaction on it was not considering the expansion and mux lines in the check for the same component id
This commit is contained in:
csawatzky 2025-11-03 09:52:27 -06:00
parent af279cb2f3
commit beee7b6f2a
2 changed files with 6 additions and 2 deletions

View file

@ -252,7 +252,9 @@ export default function DevicePage() {
let id: quack.IComponentID = quack.ComponentID.fromObject({ let id: quack.IComponentID = quack.ComponentID.fromObject({
type: c.settings.type, type: c.settings.type,
addressType: c.settings.addressType, addressType: c.settings.addressType,
address: c.settings.address address: c.settings.address,
expansionLine: c.settings.expansionLine,
muxLine: c.settings.muxLine
}); });
let filteredInteractions = interactions.filter(interaction => { let filteredInteractions = interactions.filter(interaction => {
let isSource = false; let isSource = false;

View file

@ -15,7 +15,9 @@ export function sameComponentID(
const sameType: boolean = id1.type === id2.type; const sameType: boolean = id1.type === id2.type;
const sameAddressType: boolean = id1.addressType === id2.addressType; const sameAddressType: boolean = id1.addressType === id2.addressType;
const sameAddress: boolean = (!id1.address && !id2.address) || id1.address === id2.address; const sameAddress: boolean = (!id1.address && !id2.address) || id1.address === id2.address;
return sameType && sameAddressType && sameAddress; const sameExpansion: boolean = (!id1.expansionLine && !id2.expansionLine) || id1.expansionLine === id2.expansionLine;
const sameMux: boolean = (!id1.muxLine && !id2.muxLine) || id1.muxLine === id2.muxLine;
return sameType && sameAddressType && sameAddress && sameExpansion && sameMux;
} }
export function getComponentIDString(component?: Component): string { export function getComponentIDString(component?: Component): string {