Merged PR 169: Fix bugs with flex + Disable obnoxious swals + Add selector text + Sort SVG scss to different files

- Disable PushBehavior and set it in a different file
- Fix behviors when parent === undefined
- Fix flex behavrios when using anchors
- Fix siblings not applying flex to theirs children on container delete
- Fix flex behavior when using anchors
- Enable flex by default
- Disable obnoxious swals
- Add selector text
- Sort SVG scss to different files

Others: Add some todos
This commit is contained in:
Eric Nguyen 2022-08-26 13:59:03 +00:00
parent a718268972
commit 3f58c5ba5e
15 changed files with 208 additions and 134 deletions

View file

@ -9,7 +9,8 @@ import { ISymbolModel } from '../Interfaces/ISymbolModel';
/// CONTAINER DEFAULTS ///
export const SHOW_TEXT = true;
export const SHOW_TEXT = false;
export const SHOW_SELECTOR_TEXT = true;
export const DEFAULTCHILDTYPE_ALLOW_CYCLIC = false;
export const DEFAULTCHILDTYPE_MAX_DEPTH = 10;

View file

@ -20,17 +20,17 @@
export function Simplex(minWidths: number[], requiredMaxWidth: number): number[] {
/// 1) standardized the equations
// add the min widths constraints
const maximumConstraints = minWidths.map(minWidth => minWidth * -1);
const constraints = minWidths.map(minWidth => minWidth * -1);
// add the max width constraint
maximumConstraints.push(requiredMaxWidth);
// add the max widths constraint
constraints.push(requiredMaxWidth);
/// 2) Create the initial matrix
// get row length (nVariables + nConstraints + 1 (z) + 1 (b))
const nVariables = minWidths.length;
const nConstraints = maximumConstraints.length;
const nConstraints = constraints.length;
const rowlength = nVariables + nConstraints + 2;
const matrix = GetInitialMatrix(maximumConstraints, rowlength, nVariables);
const matrix = GetInitialMatrix(constraints, rowlength, nVariables);
/// Apply the algorithm
const finalMatrix = ApplyMainLoop(matrix, rowlength);