@lightningtv/core
Advanced tools
Comparing version 2.4.5 to 2.4.6-beta.1
@@ -577,5 +577,7 @@ import { renderer, createShader } from './lightningInit.js'; | ||
props.width = (parent.width || 0) - props.x; | ||
node._calcWidth = true; | ||
} | ||
if (isNaN(props.height)) { | ||
props.height = (parent.height || 0) - props.y; | ||
node._calcHeight = true; | ||
} | ||
@@ -614,3 +616,3 @@ if (props.rtt && !props.color) { | ||
for (const [name, handler] of Object.entries(node.onEvent)) { | ||
node.lng.on(name, (inode, data) => handler(node, data)); | ||
node.lng.on(name, (_inode, data) => handler.call(node, node, data)); | ||
} | ||
@@ -617,0 +619,0 @@ } |
@@ -68,2 +68,9 @@ import { isTextNode } from './utils.js'; | ||
: (c) => c; | ||
if (isRow && node._calcHeight) { | ||
// Assuming all the children have the same height | ||
node.height = children[0]?.height || node.height; | ||
} | ||
else if (node._calcWidth) { | ||
node.width = children[0]?.width || node.width; | ||
} | ||
if (justify === 'flexStart') { | ||
@@ -81,5 +88,5 @@ let start = 0; | ||
const calculatedSize = start - gap; | ||
if (calculatedSize !== node[dimension]) { | ||
if (calculatedSize !== containerSize) { | ||
// store the original size for Row & Column | ||
node[`preFlex${dimension}`] = node[dimension]; | ||
node[`preFlex${dimension}`] = containerSize; | ||
node[dimension] = calculatedSize; | ||
@@ -86,0 +93,0 @@ return true; |
{ | ||
"name": "@lightningtv/core", | ||
"version": "2.4.5", | ||
"version": "2.4.6-beta.1", | ||
"description": "Lightning TV Core for Universal Renderers", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -856,2 +856,3 @@ import { renderer, createShader } from './lightningInit.js'; | ||
props.width = (parent.width || 0) - props.x; | ||
node._calcWidth = true; | ||
} | ||
@@ -861,2 +862,3 @@ | ||
props.height = (parent.height || 0) - props.y; | ||
node._calcHeight = true; | ||
} | ||
@@ -905,3 +907,3 @@ | ||
for (const [name, handler] of Object.entries(node.onEvent)) { | ||
(node.lng as INode).on(name, (inode, data) => handler(node, data)); | ||
node.lng.on(name, (_inode, data) => handler.call(node, node, data)); | ||
} | ||
@@ -908,0 +910,0 @@ } |
@@ -88,2 +88,9 @@ import { type ElementNode } from './elementNode.js'; | ||
if (isRow && node._calcHeight) { | ||
// Assuming all the children have the same height | ||
node.height = children[0]?.height || node.height; | ||
} else if (node._calcWidth) { | ||
node.width = children[0]?.width || node.width; | ||
} | ||
if (justify === 'flexStart') { | ||
@@ -101,5 +108,5 @@ let start = 0; | ||
const calculatedSize = start - gap; | ||
if (calculatedSize !== node[dimension]) { | ||
if (calculatedSize !== containerSize) { | ||
// store the original size for Row & Column | ||
node[`preFlex${dimension}`] = node[dimension]; | ||
node[`preFlex${dimension}`] = containerSize; | ||
node[dimension] = calculatedSize; | ||
@@ -106,0 +113,0 @@ return true; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
226412
3488
3