Skip to content

Bug in translations when appending a single button #2

Description

@ManuelLoaizaV

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions