Skip to content

Document node 'button' property  #45

Open
@knolleary

Description

@knolleary
button: {
            toggle: "active",
            enabled: function() {
                return !this.changed
            },
            onclick: function() { }
}

Notes:

  1. toggle identifies this should be a toggle switch (as used by Debug node). Value is a string that identifies the node property whose value should be toggled between true and false.
  2. enabled is a function that can be used to determine if the button is active or not - cannot be used with toggle - new for 0.17.
  3. onclick is a function that is called when the button is clicked. This function is called regardless of what the enabled function may have returned; in other words, even if enabled returned false, this function will still be called when the button is clicked. This allows the node to display a custom notification to tell the user why the button is not enabled.

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