Merge branch 'ent-9924-fallos-en-enlaces-entre-elementos-de-cvs' into 'develop'

Ent 9924 fallos en enlaces entre elementos de cvs

See merge request artica/pandorafms!5442
This commit is contained in:
Diego Muñoz-Reja 2023-01-30 08:15:28 +00:00
commit 4a93f9a8b3
4 changed files with 37 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -821,15 +821,34 @@ abstract class VisualConsoleItem<Props extends ItemProps> {
prevProps: Props | null = null,
prevMeta: ItemMeta | null = null
): void {
if (
prevProps &&
(prevProps.type == ItemType.LINE_ITEM ||
prevProps.type == ItemType.NETWORK_LINK)
) {
this.updateDomElement(this.childElementRef);
}
// Move box.
if (!prevProps || this.positionChanged(prevProps, this.props)) {
this.moveElement(this.props.x, this.props.y);
this.updateDomElement(this.childElementRef);
if (
prevProps &&
prevProps.type != ItemType.LINE_ITEM &&
prevProps.type != ItemType.NETWORK_LINK
) {
this.updateDomElement(this.childElementRef);
}
}
// Resize box.
if (!prevProps || this.sizeChanged(prevProps, this.props)) {
this.resizeElement(this.props.width, this.props.height);
this.updateDomElement(this.childElementRef);
if (
prevProps &&
prevProps.type != ItemType.LINE_ITEM &&
prevProps.type != ItemType.NETWORK_LINK
) {
this.updateDomElement(this.childElementRef);
}
}
// Change label.
const oldLabelHtml = this.labelElementRef.innerHTML;

View File

@ -558,6 +558,20 @@ export default class VisualConsole {
delete this.lineLinks[i];
}
}
if (
(this.lineLinks[i][line].start != itemAtStart &&
this.lineLinks[i][line].end == itemAtEnd) ||
(this.lineLinks[i][line].start == itemAtStart &&
this.lineLinks[i][line].end != itemAtEnd)
) {
// Object not connected to a line.
delete this.lineLinks[i][line];
if (Object.keys(this.lineLinks[i]).length === 0) {
delete this.lineLinks[i];
}
}
}
}
} catch (error) {