UNPKG

sprotty

Version:

A next-gen framework for graphical views

46 lines 1.98 kB
"use strict"; /******************************************************************************** * Copyright (c) 2017-2024 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.DEFAULT_EDGE_PLACEMENT = exports.EdgePlacement = exports.checkEdgePlacement = exports.isEdgeLayoutable = exports.edgeLayoutFeature = void 0; const smodel_1 = require("../../base/model/smodel"); const model_1 = require("../bounds/model"); const model_2 = require("../routing/model"); exports.edgeLayoutFeature = Symbol('edgeLayout'); function isEdgeLayoutable(element) { return element instanceof smodel_1.SChildElementImpl && element.parent instanceof model_2.SRoutableElementImpl && (0, model_1.isBoundsAware)(element) && element.hasFeature(exports.edgeLayoutFeature); } exports.isEdgeLayoutable = isEdgeLayoutable; function checkEdgePlacement(element) { return 'edgePlacement' in element; } exports.checkEdgePlacement = checkEdgePlacement; /** * @deprecated Use EdgePlacement from sprotty-protocol instead */ class EdgePlacement extends Object { } exports.EdgePlacement = EdgePlacement; exports.DEFAULT_EDGE_PLACEMENT = { rotate: true, side: 'top', position: 0.5, offset: 7 }; //# sourceMappingURL=model.js.map