SimpleStateManager icon indicating copy to clipboard operation
SimpleStateManager copied to clipboard

maxHeight and minHeight?

Open atacrawl opened this issue 12 years ago • 1 comments

SSM is a great script, but it would be even greater if it could check for viewport height along with width. Keep up the good work, I've found this to be very useful.

atacrawl avatar Oct 15 '14 15:10 atacrawl

This functionality is easy to roll in yourself using custom config options, look at ssm.addConfigOption in the documentation, this is the code used within SSM for max widths so you would just need to write something similar for height

ssm.addConfigOption({name:"maxWidth", test: function(){ if(typeof this.state.maxWidth === "number" && this.state.maxWidth >= this.browserWidth){ return true; } else{ return false; } }});

jonathan-fielding avatar Oct 20 '14 13:10 jonathan-fielding