Explorar o código

Merge pull request #945 from ivanov/quick-doc

Add documentation about widget.id requirement
Steven Silvester %!s(int64=8) %!d(string=hai) anos
pai
achega
8470fabbda
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      src/application/shell.ts

+ 12 - 0
src/application/shell.ts

@@ -160,6 +160,9 @@ class ApplicationShell extends Widget {
 
   /**
    * Add a widget to the top content area.
+   *
+   * #### Notes
+   * Widgets must have a unique `id` property, which will be used as the DOM id.
    */
   addToTopArea(widget: Widget, options: ISideAreaOptions = {}): void {
     if (!widget.id) {
@@ -172,6 +175,9 @@ class ApplicationShell extends Widget {
 
   /**
    * Add a widget to the left content area.
+   *
+   * #### Notes
+   * Widgets must have a unique `id` property, which will be used as the DOM id.
    */
   addToLeftArea(widget: Widget, options: ISideAreaOptions = {}): void {
     if (!widget.id) {
@@ -184,6 +190,9 @@ class ApplicationShell extends Widget {
 
   /**
    * Add a widget to the right content area.
+   *
+   * #### Notes
+   * Widgets must have a unique `id` property, which will be used as the DOM id.
    */
   addToRightArea(widget: Widget, options: ISideAreaOptions = {}): void {
     if (!widget.id) {
@@ -196,6 +205,9 @@ class ApplicationShell extends Widget {
 
   /**
    * Add a widget to the main content area.
+   *
+   * #### Notes
+   * Widgets must have a unique `id` property, which will be used as the DOM id.
    */
   addToMainArea(widget: Widget): void {
     // TODO