vis-core 0.30.0-beta.38 → 0.30.0-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ import { continentsCountriesIso2 } from "geojson-cn";
63
63
  Array.prototype.at || (Array.prototype.at = function(le) {
64
64
  return le < 0 && (le = this.length + le), this[le];
65
65
  });
66
- const version = "0.30.0-beta.38", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
66
+ const version = "0.30.0-beta.39", publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEyTG1aVVQzVG9LZEVRRUdrdUU1QQo3dnlYTzRMM1Z6NDA5RFF2a2xzRHZ2SytNM2M2OGl4ZEVhZDZFcnZGS2FKQ1QrNTZNdU1XSXhUTnlDZDVQSkFGCjVYdzI4cW1iVkVCR3FGdXVIZTltSm5GUmRXN1NpK1Z1cTZvRWxwQkRkeEFIQ0dsWVVpU1R3WmhBbjJaVXJLSUYKd1J2c1k1bi9uWWNhZnl5QW9tRjhmNVRsTkpwS1JtbDU3WlRSWjBMdzdQRDFSeHFIbmJ0YWFETkpiSDV5eFd6cQpaVTBwQWhxMFNkNHdlOW1DUTJWWXc5czhtUERLbW4rU083eGovSUsrR1ZEaEJNOUpaZ3VIcGFZUGt3bWd5UkdwCkx6V0tHMkZULzJRalZUT1dRT09mRFVtVitDSVlsN1hVVlh1Q0toYWFNQ0ZVa1JQOHg4aEZucmNFeklHQ1JpM3IKK3dJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t", accessToken = {
67
67
  token: void 0,
68
68
  getInfo() {
69
69
  if (!this.token)
@@ -57496,10 +57496,9 @@ class ei {
57496
57496
  this.cursorListenerAdded = !0;
57497
57497
  const e = (n) => {
57498
57498
  var r;
57499
- if (!this.enabled || this.cursorObjects.size === 0) {
57500
- this.resetCursor();
57499
+ if (!this.enabled)
57501
57500
  return;
57502
- }
57501
+ this.cursorObjects.size === 0 && this.resetCursor();
57503
57502
  const fe = [...this.cursorObjects.keys()].filter((Pe) => Pe.object3d && Pe.visibleWithAncestors).map((Pe) => Pe.object3d);
57504
57503
  if (fe.length === 0) {
57505
57504
  this.resetCursor();
@@ -145277,13 +145276,14 @@ class MapManager {
145277
145276
  T0(this, "mapConfigs", {});
145278
145277
  T0(this, "currentMap", null);
145279
145278
  T0(this, "currentZoom", 1);
145279
+ T0(this, "mapPadding");
145280
145280
  // 分组管理
145281
145281
  T0(this, "groups", {});
145282
145282
  // 事件处理器
145283
145283
  T0(this, "eventHandlers", {});
145284
145284
  // 定时器管理
145285
145285
  T0(this, "areaCloseTimer", null);
145286
- this.container = e.container, this.controlsContainer = e.controlsContainer || e.container, this.assetsPrefix = e.assetsPrefix, this.fixConfig = e.fixConfig, this.raycasterPointsThreshold = e.raycasterPointsThreshold || 5e-3;
145286
+ this.container = e.container, this.controlsContainer = e.controlsContainer || e.container, this.assetsPrefix = e.assetsPrefix, this.fixConfig = e.fixConfig, this.raycasterPointsThreshold = e.raycasterPointsThreshold || 5e-3, this.mapPadding = e.mapPadding || [0, 0, 0, 0];
145287
145287
  }
145288
145288
  /**
145289
145289
  * 设置事件处理器
@@ -145357,7 +145357,7 @@ class MapManager {
145357
145357
  }), Ne.pencil.camera.near = 0.01, Ne.pencil.camera.updateProjectionMatrix(), Ne.pencil.raycaster.params.Points.threshold = this.raycasterPointsThreshold, Ne.pencil.controls.addEventListener("update", () => {
145358
145358
  const ke = Ne.pencil.controls.distance, xt = Math.round(this.mapDistances[fe] / ke * 10) / 10;
145359
145359
  this.currentZoom !== xt && (this.currentZoom = xt, this.emit("zoomChange", xt));
145360
- }), fe !== "country" && (Ne.options.mapPadding = [220, 300, 70, 0], Ne.options.polarAngle = -Math.PI, yield Ne.fitTo(Ne.map, { enableTransition: !1 }), yield Ne.fitTo(Ne.map, { enableTransition: !1 })), this.applyFixConfig(Ne, fe, ze, e), Ce != null && Ce.c.length && !n && this.bindAreaEvents(Ne), this.mapInstances[fe] = Ne, Ne.setSceneActive(), this.currentMap = Ne, this.currentZoom = 1, this.emit("zoomChange", 1), this.mapDistances[fe] = Ne.pencil.controls.distance, Ne.pencil.controls.maxDistance = Ne.pencil.controls.distance / this.MAX_ZOOM_FACTOR, Ne.pencil.controls.minDistance = Ne.pencil.controls.distance / this.MIN_ZOOM_FACTOR, Ne.options.fixedAdcode = n, Ne;
145360
+ }), fe !== "country" && (Ne.options.mapPadding = this.mapPadding, Ne.options.polarAngle = -Math.PI, yield Ne.fitTo(Ne.map, { enableTransition: !1 }), yield Ne.fitTo(Ne.map, { enableTransition: !1 })), this.applyFixConfig(Ne, fe, ze, e), Ce != null && Ce.c.length && !n && this.bindAreaEvents(Ne), this.mapInstances[fe] = Ne, Ne.setSceneActive(), this.currentMap = Ne, this.currentZoom = 1, this.emit("zoomChange", 1), this.mapDistances[fe] = Ne.pencil.controls.distance, Ne.pencil.controls.maxDistance = Ne.pencil.controls.distance / this.MAX_ZOOM_FACTOR, Ne.pencil.controls.minDistance = Ne.pencil.controls.distance / this.MIN_ZOOM_FACTOR, Ne.options.fixedAdcode = n, Ne;
145361
145361
  });
145362
145362
  }
145363
145363
  /**
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "0.30.0-beta.38";
1
+ declare const _default: "0.30.0-beta.39";
2
2
  export default _default;
@@ -11,6 +11,7 @@ export interface MapManagerConfig {
11
11
  assetsPrefix?: string;
12
12
  fixConfig?: FixConfig;
13
13
  raycasterPointsThreshold?: number;
14
+ mapPadding?: [number, number, number, number];
14
15
  }
15
16
  export interface MapEventHandlers {
16
17
  [key: string]: (...args: any[]) => void;
@@ -31,6 +32,7 @@ export declare class MapManager {
31
32
  private mapConfigs;
32
33
  private currentMap;
33
34
  private currentZoom;
35
+ private mapPadding;
34
36
  private groups;
35
37
  private eventHandlers;
36
38
  private areaCloseTimer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vis-core",
3
- "version": "0.30.0-beta.38",
3
+ "version": "0.30.0-beta.39",
4
4
  "scripts": {
5
5
  "start": "npm run version && PORT=5173 bundler-dev",
6
6
  "build:site": "npm run version && PUBLIC_EXCLUDE=true bundler",
@@ -64,7 +64,7 @@
64
64
  "esus-lite": "^0.2.8",
65
65
  "events": "^3.3.0",
66
66
  "geojson-cn": "^0.2.5",
67
- "gl-draw": "0.17.0-beta.23",
67
+ "gl-draw": "0.17.0-beta.24",
68
68
  "jsrsasign": "^11.1.0",
69
69
  "lodash-es": "^4.17.21"
70
70
  },