@aptre/flex-layout 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4515,9 +4515,12 @@ var TabSet = (props) => {
4515
4515
  node.setTabStripRect(layout.getBoundingClientRect(tabStripRef.current));
4516
4516
  }
4517
4517
  const newContentRect = Rect.getContentRect(contentRef.current).relativeTo(layout.getDomRect());
4518
- if (!node.getContentRect().equals(newContentRect)) {
4518
+ const oldContentRect = node.getContentRect();
4519
+ if (!oldContentRect.equals(newContentRect)) {
4519
4520
  node.setContentRect(newContentRect);
4520
- if (!isFirstRender.current) {
4521
+ const oldWasEmpty = oldContentRect.width === 0 && oldContentRect.height === 0;
4522
+ const shouldRedraw = !isFirstRender.current || oldWasEmpty;
4523
+ if (shouldRedraw) {
4521
4524
  layout.redrawInternal("tabset content rect " + newContentRect);
4522
4525
  }
4523
4526
  }
@@ -1,8 +1 @@
1
- declare const localStorageMock: {
2
- getItem: (key: string) => string;
3
- setItem: (key: string, value: string) => void;
4
- removeItem: (key: string) => void;
5
- clear: () => void;
6
- readonly length: number;
7
- key: (index: number) => string;
8
- };
1
+ import "../../style/light.css";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aptre/flex-layout",
3
3
  "author": "Caplin Systems Ltd",
4
4
  "description": "A multi-tab docking layout manager",
5
- "version": "0.4.1",
5
+ "version": "0.4.2",
6
6
  "license": "ISC",
7
7
  "repository": {
8
8
  "type": "git",