phosphor-widget
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0-beta.5
@@ -159,2 +159,12 @@ import { IDisposable } from 'phosphor-disposable'; | ||
/** | ||
* Set whether the widget is hidden. | ||
* | ||
* @param hidden - `true` to hide the widget, or `false` to show it. | ||
* | ||
* #### Notes | ||
* `widget.setHidden(true)` is equivalent to `widget.hide()`, and | ||
* `widget.setHidden(false)` is equivalent to `widget.show()`. | ||
*/ | ||
setHidden(hidden: boolean): void; | ||
/** | ||
* Attach the widget to a host DOM node. | ||
@@ -161,0 +171,0 @@ * |
@@ -325,2 +325,19 @@ /*----------------------------------------------------------------------------- | ||
/** | ||
* Set whether the widget is hidden. | ||
* | ||
* @param hidden - `true` to hide the widget, or `false` to show it. | ||
* | ||
* #### Notes | ||
* `widget.setHidden(true)` is equivalent to `widget.hide()`, and | ||
* `widget.setHidden(false)` is equivalent to `widget.show()`. | ||
*/ | ||
Widget.prototype.setHidden = function (hidden) { | ||
if (hidden) { | ||
this.hide(); | ||
} | ||
else { | ||
this.show(); | ||
} | ||
}; | ||
/** | ||
* Attach the widget to a host DOM node. | ||
@@ -327,0 +344,0 @@ * |
{ | ||
"name": "phosphor-widget", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "The core Phosphor widget class.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
92915
2530