UNPKG

@kieler/klighd-core

Version:

Core KLighD diagram visualization with Sprotty

57 lines 2.17 kB
"use strict"; /* * KIELER - Kiel Integrated Environment for Layout Eclipse RichClient * * http://rtsys.informatik.uni-kiel.de/kieler * * Copyright 2021 by * + Kiel University * + Department of Computer Science * + Real-Time and Embedded Systems Group * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * SPDX-License-Identifier: EPL-2.0 */ // We follow Sprotty's way of redeclaring the interface and its create function, so disable this lint check for this file. /* eslint-disable no-redeclare */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ToggleSidebarPanelAction = exports.ShowSidebarAction = void 0; const sprotty_1 = require("sprotty"); const sidebar_1 = require("./sidebar"); var ShowSidebarAction; (function (ShowSidebarAction) { function create() { return sprotty_1.SetUIExtensionVisibilityAction.create({ extensionId: sidebar_1.Sidebar.ID, visible: true, }); } ShowSidebarAction.create = create; })(ShowSidebarAction || (exports.ShowSidebarAction = ShowSidebarAction = {})); var ToggleSidebarPanelAction; (function (ToggleSidebarPanelAction) { ToggleSidebarPanelAction.KIND = 'toggleSidebarPanel'; /** * Creates a new {@link ToggleSidebarPanelAction}. * @param id ID if the registered panel that should be shown. * @param state Explicitly sets the new state for the panel. If this parameter is * absent, the current state is toggled. */ function create(id, state) { return { kind: ToggleSidebarPanelAction.KIND, id, state, }; } ToggleSidebarPanelAction.create = create; /** Type predicate to narrow an action to this action. */ function isThisAction(action) { return action.kind === ToggleSidebarPanelAction.KIND; } ToggleSidebarPanelAction.isThisAction = isThisAction; })(ToggleSidebarPanelAction || (exports.ToggleSidebarPanelAction = ToggleSidebarPanelAction = {})); //# sourceMappingURL=actions.js.map