Skip to content

Using Buttons

Natalia Djohari edited this page Mar 6, 2019 · 4 revisions

You can specify the behaviour of each button on the watch when the page is active (visible to the user) by implementing the functions below. This is essentially overriding them from the basePage.js.

When the user clicks one of the buttons, top, bottom, left, right, or face the corresponding method will be called.

  rightButtonEvent() {
  }

  leftButtonEvent() {
  }

  topButtonEvent() {
  }

  bottomButtonEvent() {
  }

  faceButtonEvent() {
  }

for example the leftButtonEvent() is overridden on the client/src/js/pages/contactsPage/contactsPage.js

  leftButtonEvent() {
    this.navigate('/');
  }
Clone this wiki locally