@lightningtv/core
Advanced tools
Comparing version 1.5.0-rc2 to 1.5.0-rc3
@@ -46,3 +46,3 @@ import { createShader } from './lightningInit.js'; | ||
_animationRunning?: boolean; | ||
_containsTextNodes?: boolean; | ||
_containsTextNodes?: boolean | null; | ||
children: Array<ElementNode | ElementText>; | ||
@@ -49,0 +49,0 @@ } |
@@ -368,2 +368,4 @@ import { renderer, createShader } from './lightningInit.js'; | ||
queue[i].updateLayout(); | ||
// After initial render we want to updateLayout right away in case nodes are added or destroyed | ||
queue[i]._containsTextNodes = null; | ||
} | ||
@@ -439,8 +441,8 @@ }); | ||
} | ||
if (!this._containsTextNodes && this.requiresLayout()) { | ||
// Since the element doesn't contain any text nodes, it's safe do layout early since we know dimensions. | ||
if (this.requiresLayout() && !this._containsTextNodes) { | ||
// Since the element doesn't contain any text nodes, it's safe to do layout early since we know dimensions. | ||
// This has the added benefit of laying out without animating the nodes | ||
this.updateLayout(); | ||
} | ||
if (parent.requiresLayout()) { | ||
if (parent.requiresLayout() && !parent._containsTextNodes) { | ||
parent.queueLayout(); | ||
@@ -447,0 +449,0 @@ } |
{ | ||
"name": "@lightningtv/core", | ||
"version": "1.5.0-rc2", | ||
"version": "1.5.0-rc3", | ||
"description": "Lightning TV Core for Universal Renderers", | ||
@@ -5,0 +5,0 @@ "type": "module", |
# Lightning TV Core for Universal Renderers | ||
Provides an abstraction layer for Lightning Renderer which Universal renders like Solid & Vue can use. |
@@ -197,3 +197,3 @@ import { renderer, createShader } from './lightningInit.js'; | ||
_animationRunning?: boolean; | ||
_containsTextNodes?: boolean; | ||
_containsTextNodes?: boolean | null; | ||
children: Array<ElementNode | ElementText>; | ||
@@ -539,2 +539,4 @@ } | ||
queue[i]!.updateLayout(); | ||
// After initial render we want to updateLayout right away in case nodes are added or destroyed | ||
queue[i]!._containsTextNodes = null; | ||
} | ||
@@ -625,4 +627,4 @@ }); | ||
if (!this._containsTextNodes && this.requiresLayout()) { | ||
// Since the element doesn't contain any text nodes, it's safe do layout early since we know dimensions. | ||
if (this.requiresLayout() && !this._containsTextNodes) { | ||
// Since the element doesn't contain any text nodes, it's safe to do layout early since we know dimensions. | ||
// This has the added benefit of laying out without animating the nodes | ||
@@ -632,3 +634,3 @@ this.updateLayout(); | ||
if (parent.requiresLayout()) { | ||
if (parent.requiresLayout() && !parent._containsTextNodes) { | ||
parent.queueLayout(); | ||
@@ -635,0 +637,0 @@ } |
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
219160
3211
4