Skip to content

Commit

Permalink
Merge pull request #207 from lightning-js/dev
Browse files Browse the repository at this point in the history
Release 1.9.1
  • Loading branch information
michielvandergeest authored Nov 4, 2024
2 parents a22e44c + cc8291c commit 28f599d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.9.1

_4 nov 2024_

- Added fix for omitting gap-attribute in Layout component

## v1.9.0

_4 nov 2024_
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightningjs/blits",
"version": "1.9.0",
"version": "1.9.1",
"description": "Blits: The Lightning 3 App Development Framework",
"bin": "bin/index.js",
"exports": {
Expand Down
9 changes: 5 additions & 4 deletions src/engines/L3/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,27 @@ const layoutFn = function (config) {
const children = this.children
const childrenLength = children.length
let otherDimension = 0
const gap = config.gap || 0
for (let i = 0; i < childrenLength; i++) {
const node = children[i]
node[xy] = offset
// todo: temporary text check, due to 1px width of empty text node
if (wh === 'width') {
offset += node.width + (node.width !== ('text' in node ? 1 : 0) ? config.gap : 0)
offset += node.width + (node.width !== ('text' in node ? 1 : 0) ? gap : 0)
} else if (wh === 'height') {
offset +=
'text' in node
? node.width > 1
? node.height + config.gap
? node.height + gap
: 0
: node.height !== 0
? node.height + config.gap
? node.height + gap
: 0
}
otherDimension = Math.max(otherDimension, node[opositeWh])
}
// adjust the size of the layout container
this[wh] = offset - (config.gap || 0)
this[wh] = offset - gap
this[opositeWh] = otherDimension
}

Expand Down

0 comments on commit 28f599d

Please sign in to comment.