Skip to content

Instantly share code, notes, and snippets.

@bogoslavskiy
Last active July 8, 2018 20:01
Show Gist options
  • Save bogoslavskiy/a78d5e1d83d511c7646ea73c5fecd9a5 to your computer and use it in GitHub Desktop.
Save bogoslavskiy/a78d5e1d83d511c7646ea73c5fecd9a5 to your computer and use it in GitHub Desktop.
scrollToOffset(offset, animated) {
if(offset != this.scrollY._value) {
this.initialState.scrollToOffset({offset, animated});
}
}
minimizeBar = () => {
if(Math.round(this.scrollY._value) == 0) { // Full
this.scrollToOffset(this.topPartHeight);
} else { // Clamped
// ???
}
};
expandBar = () => {
if(this.stateBarTypes.EXPANDED == this.stateBar) {
return;
}
if(Math.round(this.scrollY._value) == this.topPartHeight) { // Full
this.scrollToOffset(0);
} else { // Clamped
// ???
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment