summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d74efb5)
Teaches the widget to disappear when the window changes from wide to
narrow, and reappear when it changes from narrow to wide.
+// Utility function for all widgets that want to hide in narrow windows
+widget.hideWhenNarrow = function(widget) {
+ widget.team.queue("resize-narrow").subscribe(function(n) {
+ $(widget.node).hide();
+ });
+ widget.team.queue("resize-wide").subscribe(function(n) {
+ $(widget.node).show();
+ });
+};
+
+