diff --git a/src/model/Actions.ts b/src/model/Actions.ts index f5814ce1..0a878b3e 100755 --- a/src/model/Actions.ts +++ b/src/model/Actions.ts @@ -19,6 +19,7 @@ export class Actions { static UPDATE_NODE_ATTRIBUTES = "FlexLayout_UpdateNodeAttributes"; static FLOAT_TAB = "FlexLayout_FloatTab"; static UNFLOAT_TAB = "FlexLayout_UnFloatTab"; + static DESELECT_TABSET = "FlexLayout_DeselectTabset"; /** * Adds a tab node to the given tabset node @@ -165,4 +166,11 @@ export class Actions { static unFloatTab(nodeId: string): Action { return new Action(Actions.UNFLOAT_TAB, { node: nodeId }); } + + /** + * Deselect the active tab set, setting the active tabset to undefined + */ + static deselectTabset(): Action { + return new Action(Actions.DESELECT_TABSET, {}) + } } diff --git a/src/model/Model.ts b/src/model/Model.ts index 7baaf1c2..f9bcfccb 100755 --- a/src/model/Model.ts +++ b/src/model/Model.ts @@ -422,6 +422,10 @@ export class Model { node._updateAttrs(action.data.json); break; } + case Actions.DESELECT_TABSET: { + this._activeTabSet = undefined; + break; + } default: break; }