247a79cab21d2cc745532165c62783a0b0d32348c07b9e1a4bbdac1bdf069ac6ebea3dd3c462a426c430028742a1bd99602b2dd960857ca1005622f3b63bca 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import * as graphic from '../../util/graphic.js';
  2. import ExtensionAPI from '../../core/ExtensionAPI.js';
  3. import GeoModel from '../../coord/geo/GeoModel.js';
  4. import MapSeries from '../../chart/map/MapSeries.js';
  5. import GlobalModel from '../../model/Global.js';
  6. import { Payload } from '../../util/types.js';
  7. import GeoView from '../geo/GeoView.js';
  8. import MapView from '../../chart/map/MapView.js';
  9. import Element from 'zrender/lib/Element.js';
  10. declare class MapDraw {
  11. private uid;
  12. private _controller;
  13. private _controllerHost;
  14. readonly group: graphic.Group;
  15. /**
  16. * This flag is used to make sure that only one among
  17. * `pan`, `zoom`, `click` can occurs, otherwise 'selected'
  18. * action may be triggered when `pan`, which is unexpected.
  19. */
  20. private _mouseDownFlag;
  21. private _regionsGroup;
  22. private _regionsGroupByName;
  23. private _svgMapName;
  24. private _svgGroup;
  25. private _svgGraphicRecord;
  26. private _svgDispatcherMap;
  27. constructor(api: ExtensionAPI);
  28. draw(mapOrGeoModel: GeoModel | MapSeries, ecModel: GlobalModel, api: ExtensionAPI, fromView: MapView | GeoView, payload: Payload): void;
  29. private _buildGeoJSON;
  30. private _buildSVG;
  31. private _enableBlurEntireSVG;
  32. remove(): void;
  33. findHighDownDispatchers(name: string, geoModel: GeoModel): Element[];
  34. private _svgResourceChanged;
  35. private _useSVG;
  36. private _freeSVG;
  37. private _updateController;
  38. /**
  39. * FIXME: this is a temporarily workaround.
  40. * When `geoRoam` the elements need to be reset in `MapView['render']`, because the props like
  41. * `ignore` might have been modified by `LabelManager`, and `LabelManager#addLabelsOfSeries`
  42. * will subsequently cache `defaultAttr` like `ignore`. If do not do this reset, the modified
  43. * props will have no chance to be restored.
  44. * Note: this reset should be after `clearStates` in `renderSeries` becuase `useStates` in
  45. * `renderSeries` will cache the modified `ignore` to `el._normalState`.
  46. * TODO:
  47. * Use clone/immutable in `LabelManager`?
  48. */
  49. resetForLabelLayout(): void;
  50. private _updateMapSelectHandler;
  51. }
  52. export default MapDraw;