Skip to content

Commit

Permalink
fix: should return this
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Jul 16, 2020
1 parent 1b6ece0 commit 69036e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/x6/src/model/cell.ts
Expand Up @@ -601,6 +601,7 @@ export class Cell<

setVisible(visible: boolean, options: Cell.SetOptions = {}) {
this.store.set('visible', visible, options)
return this
}

isVisible() {
Expand All @@ -611,12 +612,14 @@ export class Cell<
if (!this.isVisible()) {
this.setVisible(true, options)
}
return this
}

hide(options: Cell.SetOptions = {}) {
if (this.isVisible()) {
this.setVisible(false, options)
}
return this
}

toggleVisible(options: Cell.SetOptions = {}) {
Expand All @@ -625,6 +628,7 @@ export class Cell<
} else {
this.show(options)
}
return this
}

// #endregion
Expand Down

0 comments on commit 69036e4

Please sign in to comment.