@lightningjs/blits
Advanced tools
+7
-0
| # Changelog | ||
| ## v2.1.2 | ||
| _10 apr 2026_ | ||
| - Bumped renderer to 3.0.1 | ||
| - Removed `@updated`-calls for Layout when dimensions haven't changed | ||
| ## v2.1.1 | ||
@@ -4,0 +11,0 @@ |
+2
-2
| { | ||
| "name": "@lightningjs/blits", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "description": "Blits: The Lightning 3 App Development Framework", | ||
@@ -78,3 +78,3 @@ "bin": "bin/index.js", | ||
| "dependencies": { | ||
| "@lightningjs/renderer": "^3.0.0", | ||
| "@lightningjs/renderer": "^3.0.1", | ||
| "magic-string": "^0.30.21" | ||
@@ -81,0 +81,0 @@ }, |
@@ -88,3 +88,7 @@ /* | ||
| */ | ||
| const layoutFn = function (config) { | ||
| const w = this.node.w | ||
| const h = this.node.h | ||
| const position = config.direction === 'vertical' ? 'y' : 'x' | ||
@@ -102,2 +106,3 @@ const oppositePosition = config.direction === 'vertical' ? 'x' : 'y' | ||
| const elementChildren = this.children | ||
| let otherDimension = 0 | ||
@@ -142,3 +147,3 @@ const gap = config.gap || 0 | ||
| // emit an updated event | ||
| if (config['@updated'] !== undefined) { | ||
| if ((config['@updated'] !== undefined) & (this.node.w !== w || this.node.h !== h)) { | ||
| config['@updated']({ w: this.node.w, h: this.node.h }, this) | ||
@@ -145,0 +150,0 @@ } |
638219
0.03%13380
0.01%Updated