@lightningjs/solid
Advanced tools
Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -277,2 +277,10 @@ /* | ||
_resizeOnTextLoad() { | ||
this.lng.once('textLoaded', (elm, size) => { | ||
this.width = size.width; | ||
this.height = size.height; | ||
this.parent.updateLayout(this, size); | ||
}); | ||
} | ||
getText() { | ||
@@ -447,7 +455,4 @@ return this.children.map((c) => c.text).join(''); | ||
if (!node.width || !node.height) { | ||
node.lng.once('textLoaded', (elm, size) => { | ||
node.width = size.width; | ||
node.height = size.height; | ||
node.parent.updateLayout(node, size); | ||
}); | ||
node._autosized = true; | ||
node._resizeOnTextLoad(); | ||
} | ||
@@ -454,0 +459,0 @@ } else { |
@@ -37,3 +37,5 @@ /* | ||
node.text = value; | ||
node.parent.text = value; | ||
const parent = node.parent; | ||
parent._autosized && parent._resizeOnTextLoad(); | ||
parent.text = parent.getText(); | ||
}, | ||
@@ -54,3 +56,5 @@ setProperty(node, name, value = true) { | ||
if (!parent.isTextNode()) { | ||
console.error('Inserting text outside of a <Text> node is not allowed'); | ||
console.error( | ||
'Inserting text outside of a <Text> node is not allowed', | ||
); | ||
} | ||
@@ -57,0 +61,0 @@ parent.text = parent.getText(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59277
1157