minimap.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. import { NgZone } from '@angular/core';
  6. import { ZoomBehavior, ZoomTransform } from 'd3-zoom';
  7. import { NzSafeAny } from 'ng-zorro-antd/core/types';
  8. import { NzZoomTransform } from '../interface';
  9. export declare class Minimap {
  10. private ngZone;
  11. private svg;
  12. private zoomG;
  13. private mainZoom;
  14. private minimap;
  15. private maxWidth;
  16. private labelPadding;
  17. private canvas;
  18. private canvasRect;
  19. private canvasBuffer;
  20. private minimapSvg;
  21. private viewpoint;
  22. private scaleMinimap;
  23. private scaleMain;
  24. private translate;
  25. private viewpointCoord;
  26. private minimapSize;
  27. private unlisteners;
  28. constructor(ngZone: NgZone, svg: SVGSVGElement, zoomG: SVGGElement, mainZoom: ZoomBehavior<NzSafeAny, NzSafeAny>, minimap: HTMLElement, maxWidth: number, labelPadding: number);
  29. destroy(): void;
  30. private minimapOffset;
  31. private updateViewpoint;
  32. update(): void;
  33. /**
  34. * Handles changes in zooming/panning. Should be called from the main svg
  35. * to notify that a zoom/pan was performed and this minimap will update it's
  36. * viewpoint rectangle.
  37. *
  38. * @param transform
  39. */
  40. zoom(transform?: ZoomTransform | NzZoomTransform): void;
  41. }