Kaynağa Gözat

Style fixes.

Ian Rose 8 yıl önce
ebeveyn
işleme
9b91bd7fc5

+ 1 - 1
packages/codeeditor/src/editor.ts

@@ -180,7 +180,7 @@ namespace CodeEditor {
     constructor(options?: Model.IOptions) {
       options = options || {};
 
-      if(options.modelDB) {
+      if (options.modelDB) {
         this.modelDB = options.modelDB;
       } else {
         this.modelDB = new ModelDB();

+ 1 - 1
packages/coreutils/src/modeldb.ts

@@ -336,7 +336,7 @@ class ModelDB implements IModelDB {
    */
   constructor(options: ModelDB.ICreateOptions = {}) {
     this._basePath = options.basePath || '';
-    if(options.baseDB) {
+    if (options.baseDB) {
       this._db = options.baseDB;
     } else {
       this._db = new ObservableMap<IObservable>();

+ 1 - 1
packages/coreutils/src/observablevector.ts

@@ -563,7 +563,7 @@ class ObservableVector<T> extends Vector<T> implements IObservableVector<T> {
    * A `fromIndex` or a `toIndex` which is non-integral.
    */
   move(fromIndex: number, toIndex: number): void {
-    if(this.length <= 1 || fromIndex === toIndex) {
+    if (this.length <= 1 || fromIndex === toIndex) {
       return;
     }
     let value = this.at(fromIndex);

+ 1 - 1
packages/notebook/src/actions.ts

@@ -1109,7 +1109,7 @@ namespace Private {
       // Add a new cell if the notebook is empty. This is done
       // within the compound operation to make the deletion of
       // a notebook's last cell undoable.
-      if(!cells.length) {
+      if (!cells.length) {
         cells.pushBack(model.contentFactory.createCodeCell({}));
       }
       cells.endCompoundOperation();

+ 3 - 3
packages/notebook/src/model.ts

@@ -422,7 +422,7 @@ namespace NotebookModel {
       if (options.contentFactory) {
         options.contentFactory = this.codeCellContentFactory;
       }
-      if(this._modelDB) {
+      if (this._modelDB) {
         options.modelDB = this._modelDB.view(options.uuid || utils.uuid());
       }
       return new CodeCellModel(options);
@@ -437,7 +437,7 @@ namespace NotebookModel {
      *   new cell will be intialized with the data from the source.
      */
     createMarkdownCell(options: CellModel.IOptions): IMarkdownCellModel {
-      if(this._modelDB) {
+      if (this._modelDB) {
         options.modelDB = this._modelDB.view(options.uuid || utils.uuid());
       }
       return new MarkdownCellModel(options);
@@ -452,7 +452,7 @@ namespace NotebookModel {
      *   new cell will be intialized with the data from the source.
      */
     createRawCell(options: CellModel.IOptions): IRawCellModel {
-      if(this._modelDB) {
+      if (this._modelDB) {
         options.modelDB = this._modelDB.view(options.uuid || utils.uuid());
       }
      return new RawCellModel(options);

+ 3 - 3
packages/outputarea/src/model.ts

@@ -42,7 +42,7 @@ class OutputAreaModel implements IOutputAreaModel {
     }
     this.list.changed.connect(this._onListChanged, this);
 
-    if(options.modelDB) {
+    if (options.modelDB) {
       let changeGuard = false;
       this._modelDB = options.modelDB;
       this._serialized = this._modelDB.createValue('outputs');
@@ -52,14 +52,14 @@ class OutputAreaModel implements IOutputAreaModel {
         this._serialized.set(this.toJSON());
       }
       this._serialized.changed.connect((obs, args) => {
-        if(!changeGuard) {
+        if (!changeGuard) {
           changeGuard = true;
           this.fromJSON(args.newValue as nbformat.IOutput[]);
           changeGuard = false;
         }
       });
       this.list.changed.connect((list, args) => {
-        if(!changeGuard) {
+        if (!changeGuard) {
           changeGuard = true;
           this._serialized.set(this.toJSON());
           changeGuard = false;