UNPKG

sprotty

Version:

A next-gen framework for graphical views

29 lines 1.58 kB
/******************************************************************************** * Copyright (c) 2017-2023 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 { Bounds } from 'sprotty-protocol'; import { Viewport } from 'sprotty-protocol/lib/model'; import { SModelElementImpl, SModelRootImpl } from '../../base/model/smodel'; import { Limits } from '../../utils/geometry'; export declare const viewportFeature: unique symbol; /** * Determine whether the given model element has a viewport. */ export declare function isViewport(element: SModelElementImpl): element is SModelRootImpl & Viewport; /** * Apply limits to the given viewport. */ export declare function limitViewport(viewport: Viewport, canvasBounds: Bounds | undefined, horizontalScrollLimits: Limits | undefined, verticalScrollLimits: Limits | undefined, zoomLimits: Limits | undefined): Viewport; //# sourceMappingURL=model.d.ts.map