@maptalks/vt 0.105.2 → 0.105.3

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @maptalks/vt v0.105.2
2
+ * @maptalks/vt v0.105.3
3
3
  * LICENSE : undefined
4
4
  * (c) 2016-2025 maptalks.org
5
5
  */
@@ -6295,12 +6295,16 @@
6295
6295
  name: "aMarkerDy"
6296
6296
  }), o;
6297
6297
  }
6298
+ _prepareFnTypes() {
6299
+ this.iconAtlas || (this._fnTypes.markerWidthFn = this._fnTypes.markerHeightFn = this._fnTypes.markerDxFn = this._fnTypes.markerDyFn = this._fnTypes.markerPitchAlignmentFn = this._fnTypes.markerRotationAlignmentFn = this._fnTypes.markerRotationFn = this._fnTypes.markerAllowOverlapFn = this._fnTypes.markerIgnorePlacementFn = this._fnTypes.markerOpacityFn = null),
6300
+ this.glyphAtlas || (this._fnTypes.textFillFn = this._fnTypes.textSizeFn = this._fnTypes.textHaloFillFn = this._fnTypes.textHaloRadiusFn = this._fnTypes.textHaloOpacityFn = this._fnTypes.textDxFn = this._fnTypes.textDyFn = this._fnTypes.textPitchAlignmentFn = this._fnTypes.textRotationAlignmentFn = this._fnTypes.textRotationFn = this._fnTypes.textAllowOverlapFn = this._fnTypes.textIgnorePlacementFn = this._fnTypes.textOpacityFn = null);
6301
+ }
6298
6302
  createDataPack() {
6299
6303
  if (!this.iconAtlas && !this.glyphAtlas) {
6300
6304
  if (!this.options.allowEmptyPack) return null;
6301
6305
  this.empty = !0;
6302
6306
  }
6303
- this.countOutOfAngle = 0, this.lineVertex = [];
6307
+ this._prepareFnTypes(), this.countOutOfAngle = 0, this.lineVertex = [];
6304
6308
  const e = super.createDataPack.apply(this, arguments);
6305
6309
  return e ? (e.lineVertex = new Int16Array(this.lineVertex), e.buffers.push(e.lineVertex.buffer),
6306
6310
  e) : null;
@@ -8085,7 +8089,7 @@
8085
8089
  r.aColor.currentIndex = e;
8086
8090
  }
8087
8091
  let n;
8088
- n = h ? Math.max(Math.abs(t.x), Math.abs(t.y)) : Math.max(Math.abs(t.x), Math.abs(t.y), Math.abs(t.z)),
8092
+ n = h ? Math.max(Math.abs(t.x), Math.abs(t.y)) : Math.max(Math.abs(t.x), Math.abs(t.y), Math.abs(t.z || 0)),
8089
8093
  n > this.maxPos && (this.maxPos = n);
8090
8094
  }
8091
8095
  }
@@ -12783,7 +12787,11 @@
12783
12787
  for (let n = 0; n < e.length; n++) if (ti(t[e[n]])) return !0;
12784
12788
  return !1;
12785
12789
  }(a, t) ? (ti(t[o]) && Xn(e, t, n), l) : (void 0 === n.index && (e.deleteData(s),
12786
- Yn(e, s)), null) : ti(t[o]) ? (l = e.data[s] = new n.type(n.width * r.length), function(e, t, n, i, r) {
12790
+ Yn(e, s)), null) : ti(t[o]) && function(e, t) {
12791
+ if (e.startsWith("marker") && !t.properties.iconAtlas) return !1;
12792
+ if (e.startsWith("text") && !t.properties.glyphAtlas) return !1;
12793
+ return !0;
12794
+ }(o, e) ? (l = e.data[s] = new n.type(n.width * r.length), function(e, t, n, i, r) {
12787
12795
  const {attrName: s} = i, o = (Bn + s + "Index").trim();
12788
12796
  Xn(t, n, i);
12789
12797
  const a = t.properties[o];
@@ -12831,7 +12839,7 @@
12831
12839
  Kn(o, i, l, t);
12832
12840
  continue;
12833
12841
  }
12834
- const c = Wn(o, n, l), u = l.define;
12842
+ const c = Wn(o, n, l, t), u = l.define;
12835
12843
  if (c) {
12836
12844
  const n = (Bn + h + "Index").trim();
12837
12845
  if (Kn(o, o.properties[n], l, t), t._getFeatureStateStamp && (o._featureTimestamp = t._getFeatureStateStamp()),
@@ -21922,6 +21930,6 @@
21922
21930
  e.PointLayer = Sl, e.PolygonLayer = Ol, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Tu, e.SYMBOLS_NEED_REBUILD_IN_VT = Au,
21923
21931
  e.TextPainter = Lo, e.TextPlugin = Ua, e.TubePlugin = Xa, e.Vector3DLayer = ln,
21924
21932
  e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin = $a, e.WireframePainter = oa,
21925
- e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.2");
21933
+ e.WireframePlugin = ja, "undefined" != typeof console && console.log("@maptalks/vt v0.105.3");
21926
21934
  }));
21927
21935
  //# sourceMappingURL=maptalks.vt.js.map