Skip to content

Instantly share code, notes, and snippets.

@markmarijnissen
Created July 1, 2014 19:42
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save markmarijnissen/13ba9224719fc0ab14b4 to your computer and use it in GitHub Desktop.
Save markmarijnissen/13ba9224719fc0ab14b4 to your computer and use it in GitHub Desktop.
ShowModifier
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