-
-
Save akotlov/a5ced76e011f3fa029d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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