sprotty
Version:
A next-gen framework for graphical views
40 lines • 2.54 kB
TypeScript
/********************************************************************************
* 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
********************************************************************************/
import { Viewport } from 'sprotty-protocol/lib/model';
import { Action } from 'sprotty-protocol/lib/actions';
import { Point } from 'sprotty-protocol/lib/utils/geometry';
import { SModelElementImpl, SModelRootImpl } from '../../base/model/smodel';
import { MouseListener } from '../../base/views/mouse-tool';
import { ViewerOptions } from '../../base/views/viewer-options';
export declare class ScrollMouseListener extends MouseListener {
protected viewerOptions: ViewerOptions;
protected lastScrollPosition: Point | undefined;
protected scrollbar: HTMLElement | undefined;
protected scrollbarMouseDownTimeout: number | undefined;
protected scrollbarMouseDownDelay: number;
mouseDown(target: SModelElementImpl, event: MouseEvent): (Action | Promise<Action>)[];
mouseMove(target: SModelElementImpl, event: MouseEvent): Action[];
mouseEnter(target: SModelElementImpl, event: MouseEvent): Action[];
mouseUp(target: SModelElementImpl, event: MouseEvent): Action[];
doubleClick(target: SModelElementImpl, event: MouseEvent): Action[];
protected dragCanvas(model: SModelRootImpl & Viewport, event: MouseEvent, lastScrollPosition: Point): Action[];
protected moveScrollBar(model: SModelRootImpl & Viewport, event: MouseEvent, scrollbar: HTMLElement, animate?: boolean): Action[];
protected getScrollbar(event: MouseEvent): HTMLElement | undefined;
protected getScrollbarOrientation(scrollbar: HTMLElement): 'horizontal' | 'vertical';
protected findClickTarget(scrollbar: HTMLElement, event: MouseEvent): HTMLElement | undefined;
}
export declare function findViewportScrollbar(event: MouseEvent): HTMLElement | undefined;
//# sourceMappingURL=scroll.d.ts.map