fix: restore original container height when unbinding text which was binded via context menu (#6444)
* fix: restore original container height when unbinding text which was binded via context menu * remove flag * comment
This commit is contained in:
parent
21726e22cc
commit
801412bf6b
@ -16,6 +16,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
getOriginalContainerHeightFromCache,
|
getOriginalContainerHeightFromCache,
|
||||||
resetOriginalContainerCache,
|
resetOriginalContainerCache,
|
||||||
|
updateOriginalContainerCache,
|
||||||
} from "../element/textWysiwyg";
|
} from "../element/textWysiwyg";
|
||||||
import {
|
import {
|
||||||
hasBoundTextElement,
|
hasBoundTextElement,
|
||||||
@ -145,7 +146,11 @@ export const actionBindText = register({
|
|||||||
id: textElement.id,
|
id: textElement.id,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
const originalContainerHeight = container.height;
|
||||||
redrawTextBoundingBox(textElement, container);
|
redrawTextBoundingBox(textElement, container);
|
||||||
|
// overwritting the cache with original container height so
|
||||||
|
// it can be restored when unbind
|
||||||
|
updateOriginalContainerCache(container.id, originalContainerHeight);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
elements: pushTextAboveContainer(elements, container, textElement),
|
elements: pushTextAboveContainer(elements, container, textElement),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user