mojs / mojs-player

GUI player to control your animations
MIT License
292 stars 49 forks source link

Add `onToggleHide` callback #2

Closed legomushroom closed 7 years ago

legomushroom commented 7 years ago

Add the onToggleHide callback that will be called with a boolean indicating the visibility state of the player. This callback should be called after user taps on the button:

hide button

Player's constructor with the callback:

new MojsPlayer({
  add: timeline,
  onToggleShow(isHidden) {
    if (isHidden) { // do something when player is invisiblie }
    else { // do something when player is visiblie }
  }
});

Please let me know is you are want to help and have any question.

dev99problems commented 7 years ago

Hi there https://github.com/legomushroom/mojs-player/pull/11

weisjohn commented 7 years ago

@legomushroom is this ready to close? curious if you still want help on it.

legomushroom commented 7 years ago

@weisjohn thanks a lot, this one is merged here: https://github.com/legomushroom/mojs-player/pull/11 , sorry about the confusion.