@lightningjs/solid
Advanced tools
Comparing version 0.3.4 to 0.3.5
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"description": "Lightning renderer for solid universal", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -22,2 +22,4 @@ /* | ||
let dimension = direction === 'row' ? 'width' : 'height'; | ||
let marginOne = direction === 'row' ? 'marginLeft' : 'marginTop'; | ||
let marginTwo = direction === 'row' ? 'marginRight' : 'marginBottom'; | ||
let prop = direction === 'row' ? 'x' : 'y'; | ||
@@ -33,4 +35,4 @@ let containerSize = node[dimension]; | ||
children.forEach((c) => { | ||
c[prop] = start; | ||
start += c[dimension] + gap; | ||
c[prop] = start + (c[marginOne] || 0); | ||
start += c[dimension] + gap + (c[marginOne] || 0) + (c[marginTwo] || 0); | ||
}); | ||
@@ -42,8 +44,8 @@ } | ||
let c = children[i]; | ||
c[prop] = start - c[dimension]; | ||
start -= c[dimension] + gap; | ||
c[prop] = start - c[dimension] - (c[marginTwo] || 0); | ||
start -= c[dimension] + gap + (c[marginOne] || 0) + (c[marginTwo] || 0); | ||
} | ||
} | ||
if (justify === 'center') { | ||
let start = (containerSize - (itemSize + gap * numChildren)) / 2; | ||
let start = (containerSize - (itemSize + gap * (numChildren - 1))) / 2; | ||
children.forEach((c) => { | ||
@@ -55,3 +57,3 @@ c[prop] = start; | ||
if (justify === 'spaceBetween') { | ||
let toPad = (containerSize - itemSize) / numChildren - 1; | ||
let toPad = (containerSize - itemSize) / (numChildren - 1); | ||
let start = 0; | ||
@@ -64,3 +66,3 @@ children.forEach((c) => { | ||
if (justify === 'spaceEvenly') { | ||
let toPad = (containerSize - itemSize) / numChildren; | ||
let toPad = (containerSize - itemSize) / (numChildren + 1); | ||
let start = toPad; | ||
@@ -67,0 +69,0 @@ children.forEach((c) => { |
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
80062
1719