Fix setting margins causing invalid values
This commit is contained in:
parent
d778e85b99
commit
7790ff6dfa
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ function AssignProperty(container: ContainerModel, key: string, value: string |
|
||||||
function SetMargin(): void {
|
function SetMargin(): void {
|
||||||
// We need to detect change in order to apply transformation to the width and height
|
// We need to detect change in order to apply transformation to the width and height
|
||||||
// Knowing the current margin is not enough as we dont keep the original width and height
|
// Knowing the current margin is not enough as we dont keep the original width and height
|
||||||
const oldMarginValue: number = (container.properties.margin as any)[key];
|
const oldMarginValue: number = (container.properties.margin as any)[key] ?? 0;
|
||||||
const diff = Number(value) - oldMarginValue;
|
const diff = Number(value) - oldMarginValue;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'left':
|
case 'left':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue