Skip to content

Instantly share code, notes, and snippets.

@akotlov
Forked from markmarijnissen/ShowModifier.js
Created August 18, 2014 05:31
Show Gist options
  • Save akotlov/a5ced76e011f3fa029d8 to your computer and use it in GitHub Desktop.
Save akotlov/a5ced76e011f3fa029d8 to your computer and use it in GitHub Desktop.
var Transform = require('famous/core/Transform');
function ShowModifier(options) {
this.visible = !!options.visible;
this._output = {
transform: Transform.identity,
opacity: 1,
origin: null,
align: null,
size: null,
target: null
};
}
ShowModifier.prototype.modify = function(target){
this._output.target = this.visible? target: null;
return this._output;
};
ShowModifier.prototype.show = function show(){
this.visible = true;
};
ShowModifier.prototype.hide = function hide() {
this.visible = false;
};
module.exports = ShowModifier;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment