@lightningjs/solid
Advanced tools
Comparing version 0.5.5 to 0.5.6
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -31,4 +31,4 @@ /* | ||
const root = document.getElementById('inspector'); | ||
root.style.left = bcr.left + 'px'; | ||
root.style.top = bcr.top + 'px'; | ||
root.style.left = '0px'; | ||
root.style.top = '0px'; | ||
root.style.width = Math.ceil(bcr.width / p) + 'px'; | ||
@@ -85,10 +85,15 @@ root.style.height = Math.ceil(bcr.height / p) + 'px'; | ||
createEffect(() => { | ||
if (node.id) { | ||
dom.id = node.id; | ||
} | ||
dom.style.width = node.width + 'px'; | ||
dom.style.height = node.height + 'px'; | ||
dom.style.top = node.y + 'px'; | ||
dom.style.left = node.x + 'px'; | ||
dom.style.zIndex = node.zIndex; | ||
setTimeout(() => { | ||
if (node.id) { | ||
dom.id = node.id; | ||
} | ||
if (node.clipping) { | ||
dom.style.overflow = 'hidden'; | ||
} | ||
dom.style.width = node.width + 'px'; | ||
dom.style.height = node.height + 'px'; | ||
dom.style.top = node.y + 'px'; | ||
dom.style.left = node.x + 'px'; | ||
dom.style.zIndex = node.zIndex; | ||
}, 10); | ||
}); | ||
@@ -99,2 +104,16 @@ node._dom = dom; | ||
}, | ||
setProperty(node, name, value) { | ||
if (name === 'width') { | ||
node._dom.style.width = value + 'px'; | ||
} else if (name === 'height') { | ||
node._dom.style.height = value + 'px'; | ||
} else if (name === 'y') { | ||
node._dom.style.top = value + 'px'; | ||
} else if (name === 'x') { | ||
node._dom.style.left = value + 'px'; | ||
} else if (name === 'zIndex') { | ||
node._dom.style.zIndex = value; | ||
} | ||
universalLightning.setProperty(node, name, value); | ||
}, | ||
createTextNode(text) { | ||
@@ -112,3 +131,3 @@ const dom = document.createTextNode(text); | ||
if (parent) { | ||
if (anchor) { | ||
if (anchor && parent._dom === anchor._dom.parentNode) { | ||
parent._dom.insertBefore(node._dom, anchor._dom); | ||
@@ -115,0 +134,0 @@ } else { |
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
60117
1180