Fix flex not applying when moving symbols
This commit is contained in:
parent
08f98bd40f
commit
191fa9cfa2
3 changed files with 20 additions and 19 deletions
|
@ -6,7 +6,7 @@ import { GetCurrentHistory, UpdateCounters } from '../Editor';
|
|||
import { AddMethod } from '../../../Enums/AddMethod';
|
||||
import { IAvailableContainer } from '../../../Interfaces/IAvailableContainer';
|
||||
import { GetDefaultContainerProps, DEFAULTCHILDTYPE_ALLOW_CYCLIC, DEFAULTCHILDTYPE_MAX_DEPTH } from '../../../utils/default';
|
||||
import { ApplyBehaviors } from '../Behaviors/Behaviors';
|
||||
import { ApplyBehaviors, ApplyBehaviorsOnSiblings } from '../Behaviors/Behaviors';
|
||||
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
|
||||
import Swal from 'sweetalert2';
|
||||
import { ApplyMargin, TransformX } from '../../../utils/svg';
|
||||
|
@ -626,19 +626,3 @@ function LinkSymbol(
|
|||
|
||||
newSymbol.linkedContainers.add(containerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate over the siblings of newContainer and apply the behaviors
|
||||
* @param newContainer
|
||||
* @param symbols
|
||||
* @returns
|
||||
*/
|
||||
function ApplyBehaviorsOnSiblings(newContainer: ContainerModel, symbols: Map<string, ISymbolModel>): void {
|
||||
if (newContainer.parent === null || newContainer.parent === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
newContainer.parent.children
|
||||
.filter(container => newContainer !== container)
|
||||
.forEach(container => ApplyBehaviors(container, symbols));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue