UNPKG

sprotty

Version:

A next-gen framework for graphical views

40 lines 1.98 kB
/******************************************************************************** * Copyright (c) 2017-2020 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 ********************************************************************************/ import { Dimension, Point } from 'sprotty-protocol/lib/utils/geometry'; import { SModelElementImpl } from '../../base/model/smodel'; import { SRoutableElementImpl } from '../routing/model'; export declare const editFeature: unique symbol; export declare function canEditRouting(element: SModelElementImpl): element is SRoutableElementImpl; export declare const editLabelFeature: unique symbol; /** * Feature extension interface for {@link editLabelFeature}. */ export interface EditableLabel { text: string; readonly isMultiLine?: boolean; readonly editControlDimension?: Dimension; readonly editControlPositionCorrection?: Point; } export declare function isEditableLabel<T extends SModelElementImpl>(element: T): element is T & EditableLabel; export declare const withEditLabelFeature: unique symbol; /** * Feature extension interface for {@link withEditLabelFeature}. */ export interface WithEditableLabel { readonly editableLabel?: EditableLabel & SModelElementImpl; } export declare function isWithEditableLabel<T extends SModelElementImpl>(element: T): element is T & WithEditableLabel; //# sourceMappingURL=model.d.ts.map