wip(core): Work on stack-based layouts
This commit is contained in:
parent
7ac5a88dff
commit
1c442ad580
8 changed files with 139 additions and 105 deletions
|
@ -561,9 +561,12 @@ Pattern.prototype.pack = function () {
|
|||
// First, create all stacks
|
||||
this.stacks = {}
|
||||
for (const [name, part] of Object.entries(this.parts)) {
|
||||
if (typeof this.stacks[part.stack] === 'undefined')
|
||||
this.stacks[part.stack] = this.__createStackWithContext(part.stack)
|
||||
this.stacks[part.stack].addPart(part)
|
||||
const stackName = (typeof part.stack === 'function')
|
||||
? part.stack(this.settings, name)
|
||||
: part.stack
|
||||
if (typeof this.stacks[stackName] === 'undefined')
|
||||
this.stacks[stackName] = this.__createStackWithContext(stackName)
|
||||
this.stacks[stackName].addPart(part)
|
||||
}
|
||||
|
||||
let bins = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue