Implement a simple autobind
This commit is contained in:
parent
d23bd71b7a
commit
b928cbd35d
17 changed files with 221 additions and 28 deletions
|
@ -198,8 +198,7 @@ exports.parse = (config = {}, points = {}, units = {}) => {
|
|||
// process keys that are common to all part declarations
|
||||
const operation = u[a.in(part.operation || 'add', `${name}.operation`, ['add', 'subtract', 'intersect', 'stack'])]
|
||||
const what = a.in(part.what || 'outline', `${name}.what`, ['rectangle', 'circle', 'polygon', 'outline'])
|
||||
const bound_by_default = ['rectangle']
|
||||
const bound = part.bound === undefined ? bound_by_default.includes(what) : !!part.bound
|
||||
const bound = !!part.bound
|
||||
const mirror = a.sane(part.mirror || false, `${name}.mirror`, 'boolean')()
|
||||
// `where` is delayed until we have all, potentially what-dependent units
|
||||
// default where is [0, 0], as per filter parsing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue