Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptUI: Margins class #115

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Conversation

MikeOverbeck
Copy link
Contributor

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()

@zlovatt zlovatt merged commit 9601ca4 into docsforadobe:master Dec 13, 2023
1 check passed
@zlovatt zlovatt mentioned this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants