When creating a node
m.buttons = m.top.createChild("SGFlex")
m.buttons.update({
direction: "row",
justifyContent: "spaceEvenly",
alignItems: "flexStart",
width: "1703",
height: "136",
translation: "[0, 786]"
})
and adding a single button as a child
button = m.buttons.createChild("Button")
button.addField("action", "string", false)
button.observeField("buttonSelected", "handleButtonSelected")
button.update({
iconUri: "",
focusedIconUri: "",
height: "77",
showFocusFootprint: "true",
text: "Got it!",
action: "dismiss"
})
label = button.getChild(2)
label.update({
horizAlign: "center",
font: m.regularFontConfig
})
label.observeField("horizAlign", "handleHorizAlignChange")
label.observeField("font", "handleFontChange")
fails to be in the centered as expected.
In particular, the translations received for the button is [0, 0], which doesn't make sense.
When creating a node
and adding a single button as a child
fails to be in the centered as expected.
In particular, the
translationsreceived for the button is[0, 0], which doesn't make sense.