UNPKG

sprotty

Version:

A next-gen framework for graphical views

51 lines 3.12 kB
"use strict"; /******************************************************************************** * Copyright (c) 2017-2018 TypeFox and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.labelEditUiModule = exports.labelEditModule = exports.edgeEditModule = void 0; const inversify_1 = require("inversify"); const types_1 = require("../../base/types"); const command_registration_1 = require("../../base/commands/command-registration"); const action_handler_1 = require("../../base/actions/action-handler"); const view_1 = require("../../base/views/view"); const model_1 = require("../../features/routing/model"); const svg_views_1 = require("../../lib/svg-views"); const delete_1 = require("./delete"); const edit_label_1 = require("./edit-label"); const edit_label_ui_1 = require("./edit-label-ui"); const edit_routing_1 = require("./edit-routing"); const reconnect_1 = require("./reconnect"); exports.edgeEditModule = new inversify_1.ContainerModule((bind, _unbind, isBound) => { const context = { bind, isBound }; (0, command_registration_1.configureCommand)(context, edit_routing_1.SwitchEditModeCommand); (0, command_registration_1.configureCommand)(context, reconnect_1.ReconnectCommand); (0, command_registration_1.configureCommand)(context, delete_1.DeleteElementCommand); (0, view_1.configureModelElement)(context, 'dangling-anchor', model_1.SDanglingAnchorImpl, svg_views_1.EmptyGroupView); }); exports.labelEditModule = new inversify_1.ContainerModule((bind, _unbind, isBound) => { bind(edit_label_1.EditLabelMouseListener).toSelf().inSingletonScope(); bind(types_1.TYPES.MouseListener).toService(edit_label_1.EditLabelMouseListener); bind(edit_label_1.EditLabelKeyListener).toSelf().inSingletonScope(); bind(types_1.TYPES.KeyListener).toService(edit_label_1.EditLabelKeyListener); (0, command_registration_1.configureCommand)({ bind, isBound }, edit_label_1.ApplyLabelEditCommand); }); exports.labelEditUiModule = new inversify_1.ContainerModule((bind, _unbind, isBound) => { const context = { bind, isBound }; (0, action_handler_1.configureActionHandler)(context, edit_label_1.EditLabelAction.KIND, edit_label_ui_1.EditLabelActionHandler); bind(edit_label_ui_1.EditLabelUI).toSelf().inSingletonScope(); bind(types_1.TYPES.IUIExtension).toService(edit_label_ui_1.EditLabelUI); }); //# sourceMappingURL=di.config.js.map