Following the pattern of other positional elements like Bounds, Dimension, and Point class, this adds a Margins class.
Usage:
const win = new Window('palette', 'testing panel', undefined, {
resizeable: true,
})
const textGrp = win.add('group')
textGrp.margins = 10 // Margins may be defined by a single number
textGrp.margins = [0, 1, 1, 1] as Margins // otherwise must be asserted as Margins
textGrp.margins = {
left: 10,
right: 10,
top: 10,
bottom: 10,
} as Margins
;(textGrp.margins as Margins).left = 20 // to use margins props must be asserted as Margins
win.show()
Following the pattern of other positional elements like
Bounds
,Dimension
, andPoint
class, this adds aMargins
class.Usage: