gl2d
Version:
2D graphics package for WebGL
26 lines (25 loc) • 1.06 kB
TypeScript
import { _SurfaceWheelEvent } from '../event/scroll';
import { _WheelTool } from './wheel';
/**
* Tool for zooming in and out of a surface based on scroll events and cursor position.
*/
export declare class WheelZoomTool implements _WheelTool {
/**
* The scale applied to the surface when zooming in. The inverse is applied when zooming out.
*/
scaleFactor: number;
/**
* The minimum number of milliseconds that must elapse between scroll events in order for the scale to be applied.
*/
minTimeElapse: number;
/**
* The time of the last scale in milliseconds.
*/
timeOfLastScale: number;
/**
* @param scaleFactor The scale applied to the surface whene scrolling in. The inverse is applied when scrolling out.
* @param minTimeEllapse The minimum number of milliseconds that must elapse between scroll events in order for the scale to be applied.
*/
constructor(scaleFactor: number, minTimeElapse: number);
onSurfaceEvent(event: _SurfaceWheelEvent): void;
}