From 369d5d2f2cf0f55f8b4df0130c8c388f527d377f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 22 May 2023 16:50:20 +0400 Subject: [PATCH] Update partial usage in ComponentDrag --- src/commands/view/ComponentDrag.ts | 6 +++--- src/commands/view/SelectComponent.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/view/ComponentDrag.ts b/src/commands/view/ComponentDrag.ts index e2cf9ede3..06a988afd 100644 --- a/src/commands/view/ComponentDrag.ts +++ b/src/commands/view/ComponentDrag.ts @@ -282,7 +282,7 @@ export default { setPosition({ x, y, end, position, width, height }: any) { const { target, isTran, em } = this; const unit = 'px'; - const en = !end ? 1 : ''; // this will trigger the final change + const __p = !end; // Indicate if partial change const left = `${x}${unit}`; const top = `${y}${unit}`; let styleUp = {}; @@ -291,11 +291,11 @@ export default { let transform = target.getStyle()['transform'] || ''; transform = this.setTranslate(transform, 'x', left); transform = this.setTranslate(transform, 'y', top); - styleUp = { transform, en }; + styleUp = { transform, __p }; target.addStyle(styleUp, { avoidStore: !end }); } else { const adds: any = { position, width, height }; - const style: any = { left, top, en }; + const style: any = { left, top, __p }; keys(adds).forEach(add => { const prop = adds[add]; if (prop) style[add] = prop; diff --git a/src/commands/view/SelectComponent.ts b/src/commands/view/SelectComponent.ts index 5c8d99f1e..131f1bd88 100644 --- a/src/commands/view/SelectComponent.ts +++ b/src/commands/view/SelectComponent.ts @@ -463,7 +463,7 @@ export default { { ...style, // value for the partial update - __p: !store ? 1 : '', + __p: !store, }, { avoidStore: !store } );