@maptalks/transform-control 0.105.8 → 0.106.0

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,17 +1,17 @@
1
1
  /*!
2
- * @maptalks/transform-control v0.105.8
2
+ * @maptalks/transform-control v0.106.0
3
3
  * LICENSE : UNLICENSED
4
4
  * (c) 2016-2025 maptalks.org
5
5
  */
6
- import { quat as A, mat4 as e, reshader as t, vec3 as s, vec2 as i } from "@maptalks/gl";
6
+ import { quat as A, mat4 as e, reshader as t, vec3 as s, GroupGLLayer as i, vec2 as n } from "@maptalks/gl";
7
7
 
8
- import * as n from "maptalks";
8
+ import * as o from "maptalks";
9
9
 
10
- import { Point as I, Coordinate as o, Eventable as g, Handlerable as r, Class as a, INTERNAL_LAYER_PREFIX as C } from "maptalks";
10
+ import { Point as I, Coordinate as g, Eventable as r, Handlerable as a, Class as C, INTERNAL_LAYER_PREFIX as h } from "maptalks";
11
11
 
12
- import { GLTFLayer as h, GLTFMarker as w } from "@maptalks/gltf-layer";
12
+ import { GLTFLayer as w, GLTFMarker as c } from "@maptalks/gltf-layer";
13
13
 
14
- const c = {
14
+ const Q = {
15
15
  yuanhuan: {
16
16
  accessors: [ {
17
17
  name: "����С��_1_0_positions",
@@ -1154,42 +1154,42 @@ const c = {
1154
1154
  uri: "data:application/octet-stream;base64,6gUAQAAAgD8AAIC/6gUAQAAAgD8AAIC/6gUAQAAAgD8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgL8AAIC/6gUAQAAAgD8AAIA/6gUAQAAAgD8AAIA/6gUAQAAAgD8AAIA/6gUAQAAAgL8AAIA/6gUAQAAAgL8AAIA/6gUAQAAAgL8AAIA/AFC9OQAAgD8AAIC/AFC9OQAAgD8AAIC/AFC9OQAAgD8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgL8AAIC/AFC9OQAAgD8AAIA/AFC9OQAAgD8AAIA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AAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAvwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAvwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AAAgPwAAAD8AACA/AAAAPwAAID8AAAA/AADAPgAAAD8AAMA+AAAAPwAAwD4AAAA/AAAgPwAAgD4AACA/AACAPgAAID8AAIA+AADAPgAAgD4AAMA+AACAPgAAwD4AAIA+AAAgPwAAQD8AACA/AABAPwAAYD8AAAA/AADAPgAAQD8AAAA+AAAAPwAAwD4AAEA/AAAgPwAAgD8AACA/AAAAAAAAYD8AAIA+AADAPgAAgD8AAAA+AACAPgAAwD4AAAAA"
1155
1155
  } ]
1156
1156
  }
1157
- }, Q = function() {
1157
+ }, f = function() {
1158
1158
  if ("undefined" != typeof globalThis) return globalThis;
1159
1159
  if ("undefined" != typeof self) return self;
1160
1160
  if ("undefined" != typeof window) return window;
1161
1161
  if ("undefined" != typeof global) return global;
1162
1162
  throw new Error("unable to locate global object");
1163
- }, f = Q(), l = f.gl_trans__coders = f.gl_trans__coders || {};
1163
+ }, l = f(), P = l.gl_trans__coders = l.gl_trans__coders || {};
1164
1164
 
1165
- l.inject = function(A) {
1166
- const e = A.toString(), t = e.indexOf("{") + 1, s = e.substring(0, t), i = f.gl_trans__coders = f.gl_trans__coders || {};
1167
- let n = `${s}\n const _____getGlobal = ${Q.toString()};\n const g___lobals = _____getGlobal()\n const tran_____scoders = g___lobals['gl_trans__coders'] = g___lobals['gl_trans__coders'] || {};`;
1165
+ P.inject = function(A) {
1166
+ const e = A.toString(), t = e.indexOf("{") + 1, s = e.substring(0, t), i = l.gl_trans__coders = l.gl_trans__coders || {};
1167
+ let n = `${s}\n const _____getGlobal = ${f.toString()};\n const g___lobals = _____getGlobal()\n const tran_____scoders = g___lobals['gl_trans__coders'] = g___lobals['gl_trans__coders'] || {};`;
1168
1168
  for (const A in i) "inject" !== A && "getTranscoder" !== A && "registerTranscoder" !== A && (n += 'tran_____scoders["' + A + '"] =' + i[A].toString() + "\n;");
1169
- return n += "\n(" + Q().maptalks_gltf_loader_bundle.toString() + ")({});\n", n += "\n" + e.substring(s.length),
1169
+ return n += "\n(" + f().maptalks_gltf_loader_bundle.toString() + ")({});\n", n += "\n" + e.substring(s.length),
1170
1170
  n;
1171
- }, l.registerTranscoder = function(A, e) {
1172
- l[A] = e;
1173
- }, l.getTranscoder = function(A) {
1174
- return l[A];
1171
+ }, P.registerTranscoder = function(A, e) {
1172
+ P[A] = e;
1173
+ }, P.getTranscoder = function(A) {
1174
+ return P[A];
1175
1175
  };
1176
1176
 
1177
- const P = Q().maptalks_gltf_loader;
1177
+ const D = f().maptalks_gltf_loader;
1178
1178
 
1179
- function D(s, i, n, I, o, g) {
1180
- const r = [], a = A.fromEuler([], n[0], n[1], n[2]), C = e.fromRotationTranslationScale([], a, i, I), h = function(A) {
1181
- return new P.GLTFLoader("", JSON.parse(JSON.stringify(c[A]))).load().then((A => A));
1179
+ function u(s, i, n, o, I, g) {
1180
+ const r = [], a = A.fromEuler([], n[0], n[1], n[2]), C = e.fromRotationTranslationScale([], a, i, o), h = function(A) {
1181
+ return new D.GLTFLoader("", JSON.parse(JSON.stringify(Q[A]))).load().then((A => A));
1182
1182
  }(s);
1183
1183
  return h.then((A => {
1184
1184
  t.GLTFHelper.exportGLTFPack(A).getMeshesInfo().forEach(((A, s) => {
1185
1185
  const a = new t.Material({
1186
- color: o || A.materialInfo.baseColorFactor
1186
+ color: I || A.materialInfo.baseColorFactor
1187
1187
  }), h = new t.Mesh(A.geometry, a);
1188
1188
  h.setUniform("uPickingId", g + s);
1189
1189
  const w = h.getDefines();
1190
- w.HAS_PICKING_ID = 2, h.setDefines(w), h.translate = i, h.rotation = n, h.scaling = I,
1190
+ w.HAS_PICKING_ID = 2, h.setDefines(w), h.translate = i, h.rotation = n, h.scaling = o,
1191
1191
  e.multiply(h.localTransform, C, A.nodeMatrix), h.originTransform = e.copy([], h.localTransform),
1192
- h.originColor = o || A.materialInfo.baseColorFactor, r.push(h);
1192
+ h.originColor = I || A.materialInfo.baseColorFactor, r.push(h);
1193
1193
  })), g > 100 && (r[0].properties.relatedMeshes = r.slice(1, 2), r[1].properties.relatedMeshes = r.slice(0, 1),
1194
1194
  r[2].properties.relatedMeshes = r.slice(3, 4), r[3].properties.relatedMeshes = r.slice(2, 3),
1195
1195
  r[4].properties.relatedMeshes = r.slice(5, 6), r[5].properties.relatedMeshes = r.slice(4, 5),
@@ -1197,16 +1197,16 @@ function D(s, i, n, I, o, g) {
1197
1197
  })), r;
1198
1198
  }
1199
1199
 
1200
- function u(A, e) {
1200
+ function m(A, e) {
1201
1201
  return Math.abs(A) * Math.sign(e);
1202
1202
  }
1203
1203
 
1204
- function m(A, e) {
1205
- const t = A.getCoordinates(), i = e.coordinateToPointAtRes(t, e.getGLRes()), I = [ i.x, i.y, 0 ], o = b(e, A.getTranslation());
1206
- s.add(I, I, o);
1204
+ function b(A, e) {
1205
+ const t = A.getCoordinates(), i = e.coordinateToPointAtRes(t, e.getGLRes()), n = [ i.x, i.y, 0 ], I = B(e, A.getTranslation());
1206
+ s.add(n, n, I);
1207
1207
  const g = function(A, e, t, s) {
1208
1208
  return A._pointAtResToContainerPoint(e, t, s);
1209
- }(e, new n.Point(I[0], I[1]), e.getGLRes());
1209
+ }(e, new o.Point(n[0], n[1]), e.getGLRes());
1210
1210
  g.x += 85;
1211
1211
  const r = function(A, e, t, s) {
1212
1212
  {
@@ -1214,16 +1214,16 @@ function m(A, e) {
1214
1214
  return A.coordinateToPointAtRes(s, t);
1215
1215
  }
1216
1216
  }(e, g, e.getGLRes());
1217
- return Math.sqrt(Math.pow(r.x - I[0], 2) + Math.pow(r.y - I[1], 2)) / 5.272881136101205;
1217
+ return Math.sqrt(Math.pow(r.x - n[0], 2) + Math.pow(r.y - n[1], 2)) / 5.272881136101205;
1218
1218
  }
1219
1219
 
1220
- function b(A, e) {
1220
+ function B(A, e) {
1221
1221
  if (!A) return e;
1222
1222
  const t = A.distanceToPointAtRes(e[0], e[1], A.getGLRes()), i = A.altitudeToPoint(e[2], A.getGLRes());
1223
- return s.set([], u(t.x, e[0]), u(t.y, e[1]), u(i, e[2]));
1223
+ return s.set([], m(t.x, e[0]), m(t.y, e[1]), m(i, e[2]));
1224
1224
  }
1225
1225
 
1226
- class B {
1226
+ class y {
1227
1227
  constructor(A) {
1228
1228
  this.A = A, this._meshes = this.t();
1229
1229
  }
@@ -1231,7 +1231,7 @@ class B {
1231
1231
  this.A = A;
1232
1232
  }
1233
1233
  t() {
1234
- const A = [], e = 340 / 177, t = D("jiantou", [ 1.2 * e, 0, 0 ], [ 0, 0, 90 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 7), s = D("jiantou", [ 0, 1.2 * e, 0 ], [ 0, 0, 180 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 8), i = D("jiantou", [ -1.2 * e, 0, 0 ], [ 0, 0, 270 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 9), n = D("jiantou", [ 0, -1.2 * e, 0 ], [ 0, 0, 0 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 10);
1234
+ const A = [], e = 340 / 177, t = u("jiantou", [ 1.2 * e, 0, 0 ], [ 0, 0, 90 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 7), s = u("jiantou", [ 0, 1.2 * e, 0 ], [ 0, 0, 180 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 8), i = u("jiantou", [ -1.2 * e, 0, 0 ], [ 0, 0, 270 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 9), n = u("jiantou", [ 0, -1.2 * e, 0 ], [ 0, 0, 0 ], [ e, e, e ], [ 89 / 255, 206 / 255, 147 / 255, 0 ], 10);
1235
1235
  return A.push(t, s, i, n), A;
1236
1236
  }
1237
1237
  getMeshes() {
@@ -1239,7 +1239,7 @@ class B {
1239
1239
  }
1240
1240
  }
1241
1241
 
1242
- class y {
1242
+ class p {
1243
1243
  constructor(A) {
1244
1244
  this.A = A, this._meshes = this.t();
1245
1245
  }
@@ -1247,7 +1247,7 @@ class y {
1247
1247
  this.A = A;
1248
1248
  }
1249
1249
  t() {
1250
- const A = [], e = 340 / 177, t = D("xuanzhuan", [ 0, 0, 0 ], [ 180, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .8 ], 11);
1250
+ const A = [], e = 340 / 177, t = u("xuanzhuan", [ 0, 0, 0 ], [ 180, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .8 ], 11);
1251
1251
  return A.push(t), A;
1252
1252
  }
1253
1253
  getMeshes() {
@@ -1255,7 +1255,7 @@ class y {
1255
1255
  }
1256
1256
  }
1257
1257
 
1258
- class p {
1258
+ class v {
1259
1259
  constructor(A) {
1260
1260
  this.A = A, this._meshes = this.t();
1261
1261
  }
@@ -1263,7 +1263,7 @@ class p {
1263
1263
  this.A = A;
1264
1264
  }
1265
1265
  t() {
1266
- const A = [], e = 340 / 177, t = D("yuanhuan", [ 0, 0, 0 ], [ 0, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .5 ], 12);
1266
+ const A = [], e = 340 / 177, t = u("yuanhuan", [ 0, 0, 0 ], [ 0, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .5 ], 12);
1267
1267
  return A.push(t), A;
1268
1268
  }
1269
1269
  getMeshes() {
@@ -1271,7 +1271,7 @@ class p {
1271
1271
  }
1272
1272
  }
1273
1273
 
1274
- class v {
1274
+ class d {
1275
1275
  constructor(A) {
1276
1276
  this.A = A, this._meshes = this.t();
1277
1277
  }
@@ -1279,7 +1279,7 @@ class v {
1279
1279
  this.A = A;
1280
1280
  }
1281
1281
  t() {
1282
- const A = [], e = D("plane", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 10, 10, 10 ], [ 1, 0, 0, .5 ], 16);
1282
+ const A = [], e = u("plane", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 10, 10, 10 ], [ 1, 0, 0, .5 ], 16);
1283
1283
  return A.push(e), A;
1284
1284
  }
1285
1285
  getMeshes() {
@@ -1287,7 +1287,7 @@ class v {
1287
1287
  }
1288
1288
  }
1289
1289
 
1290
- class d {
1290
+ class L {
1291
1291
  constructor(A) {
1292
1292
  this.A = A, this._meshes = this.t();
1293
1293
  }
@@ -1295,7 +1295,7 @@ class d {
1295
1295
  this.A = A;
1296
1296
  }
1297
1297
  t() {
1298
- const A = [], e = D("xyzScale", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 2, 2, 2 ], null, 113);
1298
+ const A = [], e = u("xyzScale", [ 0, 0, 0 ], [ 0, 0, 0 ], [ 2, 2, 2 ], null, 113);
1299
1299
  return A.push(e), A;
1300
1300
  }
1301
1301
  getMeshes() {
@@ -1303,45 +1303,45 @@ class d {
1303
1303
  }
1304
1304
  }
1305
1305
 
1306
- const L = [], M = [], E = [], O = [], F = [], x = [ 177 / 170, 177 / 170, 177 / 170 ], U = [], V = [ 1, 2, 3, 4, 12 ];
1306
+ const M = [], E = [], O = [], F = [], x = [], U = [ 177 / 170, 177 / 170, 177 / 170 ], V = [], S = [ 1, 2, 3, 4, 12 ];
1307
1307
 
1308
- class S {
1308
+ class k {
1309
1309
  constructor() {
1310
- this.translate = new B, this.rotation = new y, this.scaling = new p, this.planeHelper = new v,
1311
- this.xyzScaleHelper = new d, this._meshes = this.t(), this.i = !0;
1310
+ this.translate = new y, this.rotation = new p, this.scaling = new v, this.planeHelper = new d,
1311
+ this.xyzScaleHelper = new L, this._meshes = this.t(), this.i = !0;
1312
1312
  }
1313
1313
  t() {
1314
1314
  const A = {};
1315
1315
  A.translate = this.translate.getMeshes(), A.rotation = this.rotation.getMeshes(),
1316
1316
  A.scaling = this.scaling.getMeshes(), A.planeHelper = this.planeHelper.getMeshes(),
1317
1317
  A.xyzScale = this.xyzScaleHelper.getMeshes();
1318
- const e = 340 / 177, t = D("yuanhuan41", [ -2.745 * e, 2.745 * e, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 1), s = D("yuanhuan41", [ 2.745 * e, 2.745 * e, 0 ], [ -90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 2), i = D("yuanhuan41", [ 2.745 * e, -2.745 * e, 0 ], [ 90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 3), n = D("yuanhuan41", [ -2.745 * e, -2.745 * e, 0 ], [ -90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 4), I = D("yuanpan", [ 0, 0, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 89 / 255, 206 / 255, 147 / 255, .5 ], 5), o = D("zzhou", [ 0, 0, 6.5 ], [ 90, 0, 0 ], [ 1, 1, 1 ], [ 14 / 255, 127 / 255, 191 / 255, 1 ], 6);
1319
- return A.translate.push(t, s, i, n, I, o), A;
1320
- }
1321
- updateMatrix(t, i, n, I, o) {
1322
- const g = i.getCoordinates(), r = t.coordinateToPointAtRes(g, t.getGLRes()), a = i.I();
1323
- s.set(M, r.x, r.y, a);
1324
- const C = s.copy(L, o), h = b(t, i.getTranslation());
1325
- s.add(M, M, h), s.add(M, M, C);
1326
- for (const o in this._meshes) for (let g = 0; g < this._meshes[o].length; g++) {
1327
- const r = this._meshes[o][g];
1318
+ const e = 340 / 177, t = u("yuanhuan41", [ -2.745 * e, 2.745 * e, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 1), s = u("yuanhuan41", [ 2.745 * e, 2.745 * e, 0 ], [ -90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 2), i = u("yuanhuan41", [ 2.745 * e, -2.745 * e, 0 ], [ 90, 0, 180 ], [ .5 * e, .5 * e, .5 * e ], [ 149 / 255, 179 / 255, 199 / 255, .6 ], 3), n = u("yuanhuan41", [ -2.745 * e, -2.745 * e, 0 ], [ -90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 50 / 255, 130 / 255, 184 / 255, .5 ], 4), o = u("yuanpan", [ 0, 0, 0 ], [ 90, 0, 0 ], [ .5 * e, .5 * e, .5 * e ], [ 89 / 255, 206 / 255, 147 / 255, .5 ], 5), I = u("zzhou", [ 0, 0, 6.5 ], [ 90, 0, 0 ], [ 1, 1, 1 ], [ 14 / 255, 127 / 255, 191 / 255, 1 ], 6);
1319
+ return A.translate.push(t, s, i, n, o, I), A;
1320
+ }
1321
+ updateMatrix(t, i, n, o, I) {
1322
+ const g = i.getCoordinates(), r = t.coordinateToPointAtRes(g, t.getGLRes()), a = i.o();
1323
+ s.set(E, r.x, r.y, a);
1324
+ const C = s.copy(M, I), h = B(t, i.getTranslation());
1325
+ s.add(E, E, h), s.add(E, E, C);
1326
+ for (const I in this._meshes) for (let g = 0; g < this._meshes[I].length; g++) {
1327
+ const r = this._meshes[I][g];
1328
1328
  for (let g = 0; g < r.length; g++) {
1329
- const a = r[g], C = a.getUniform("uPickingId"), h = s.copy(L, a.translate);
1330
- let w = s.copy(U, a.rotation);
1329
+ const a = r[g], C = a.getUniform("uPickingId"), h = s.copy(M, a.translate);
1330
+ let w = s.copy(V, a.rotation);
1331
1331
  const c = a.scaling;
1332
1332
  if (11 === C && (this.i ? (w[2] += n, a.rotation[2] += n) : this.i || (w[2] += n,
1333
1333
  a.rotation[2] += n, w[0] = 360, w[2] -= 90)), C > 100 && 1 === i.getTargets().length && (w = i.getTargets()[0].getRotation()),
1334
- V.indexOf(C) > -1) if (12 !== C) c[0] += I, c[1] += I, c[2] += I; else {
1334
+ S.indexOf(C) > -1) if (12 !== C) c[0] += o, c[1] += o, c[2] += o; else {
1335
1335
  const A = this._meshes.translate[4][0];
1336
1336
  c[0] = 1.2 * A.scaling[0], c[1] = 1.2 * A.scaling[0], c[2] = 1.2 * A.scaling[0];
1337
1337
  }
1338
- let Q = m(i, t);
1339
- if (Q = s.set(E, Q, Q, Q), s.multiply(h, h, Q), s.multiply(Q, Q, c), 1 === C || 2 === C || 3 === C || 4 === C) {
1340
- const A = s.multiply(F, c, x);
1338
+ let Q = b(i, t);
1339
+ if (Q = s.set(O, Q, Q, Q), s.multiply(h, h, Q), s.multiply(Q, Q, c), 1 === C || 2 === C || 3 === C || 4 === C) {
1340
+ const A = s.multiply(x, c, U);
1341
1341
  s.multiply(h, h, A);
1342
1342
  }
1343
- const f = A.fromEuler(O, w[0], w[1], w[2]);
1344
- if (s.add(h, h, M), "xyzScale" === o) {
1343
+ const f = A.fromEuler(F, w[0], w[1], w[2]);
1344
+ if (s.add(h, h, E), "xyzScale" === I) {
1345
1345
  const A = e.fromRotationTranslationScale([], f, h, Q);
1346
1346
  e.multiply(a.localTransform, A, a.originTransform);
1347
1347
  } else e.fromRotationTranslationScale(a.localTransform, f, h, Q);
@@ -1353,7 +1353,7 @@ class S {
1353
1353
  return A ? ("xyzScale" === A ? e[A] = this._meshes[A] : (e.translate = this._meshes.translate,
1354
1354
  "translate" !== A && (e[A] = this._meshes[A])), e) : e;
1355
1355
  }
1356
- o(A) {
1356
+ I(A) {
1357
1357
  this.i = A;
1358
1358
  }
1359
1359
  dispose() {
@@ -1367,9 +1367,9 @@ class S {
1367
1367
  }
1368
1368
  }
1369
1369
 
1370
- const k = [], T = [], _ = [], H = new I(0, 0), J = [], N = [], R = [], K = [ 0, 0, 0 ];
1370
+ const T = [], _ = [], H = [], J = new I(0, 0), N = [], R = [], K = [], z = [ 0, 0, 0 ];
1371
1371
 
1372
- class z {
1372
+ class G {
1373
1373
  constructor() {
1374
1374
  this.C = [], this.h = [ 0, 0, 0 ], this.l = [ 1, 1, 1 ], this.P = [ 0, 0, 0 ];
1375
1375
  }
@@ -1388,12 +1388,12 @@ class z {
1388
1388
  A.off("remove", this.u, this);
1389
1389
  })), this.C = [];
1390
1390
  }
1391
- p(A, e, t, i, n, I, o) {
1392
- for (let o = 0; o < this.C.length; o++) {
1393
- const g = this.C[o], r = g.getRotation(), a = g.getScale(), C = this.v(I, g, i, t, e);
1391
+ p(A, e, t, i, n, o, I) {
1392
+ for (let I = 0; I < this.C.length; I++) {
1393
+ const g = this.C[I], r = g.getRotation(), a = g.getScale(), C = this.v(o, g, i, t, e);
1394
1394
  let h = null;
1395
1395
  h = i >= 0 ? i : i * (this.options && this.options.scaleStrength || 1);
1396
- const w = s.add(R, s.set(k, h * a[0], h * a[1], h * a[2]), a), c = Math.min(...w);
1396
+ const w = s.add(K, s.set(T, h * a[0], h * a[1], h * a[2]), a), c = Math.min(...w);
1397
1397
  if (Math.abs(c) < n) {
1398
1398
  const A = Math.abs(c);
1399
1399
  w[0] = w[0] * (n / A), w[1] = w[1] * (n / A), w[2] = w[2] * (n / A);
@@ -1403,8 +1403,8 @@ class z {
1403
1403
  const f = g.getTranslation();
1404
1404
  g.setTRS(f, Q, w);
1405
1405
  }
1406
- s.set(R, i, i, i), s.add(this.P, t, this.P), s.add(this.l, R, this.l), s.add(this.h, e, this.h),
1407
- A.indexOf("translate") > -1 ? o.fire("positionchange", {
1406
+ s.set(K, i, i, i), s.add(this.P, t, this.P), s.add(this.l, K, this.l), s.add(this.h, e, this.h),
1407
+ A.indexOf("translate") > -1 ? I.fire("positionchange", {
1408
1408
  action: A,
1409
1409
  type: "positionchange",
1410
1410
  transformtarget: this.C,
@@ -1415,7 +1415,7 @@ class z {
1415
1415
  deltaTranslate: e,
1416
1416
  deltaRotation: t,
1417
1417
  deltaScale: i
1418
- }) : o.fire("transforming", {
1418
+ }) : I.fire("transforming", {
1419
1419
  action: A,
1420
1420
  type: "transforming",
1421
1421
  transformtarget: this.C,
@@ -1428,16 +1428,16 @@ class z {
1428
1428
  deltaScale: i
1429
1429
  });
1430
1430
  }
1431
- v(t, i, n, I, o) {
1432
- const g = i.getCenter(), r = i.getTransformOrigin(), a = t.getGLRes(), C = t.coordinateToPointAtRes(g, a, H);
1433
- C.z = t.altitudeToPoint(g.z, a), s.set(J, C.x, C.y, C.z || 0);
1434
- const h = t.coordinateToPointAtRes(r, a, H);
1435
- h.z = t.altitudeToPoint(r.z, a), s.set(N, h.x, h.y, h.z || 0);
1436
- const w = s.sub(k, J, N), c = A.fromEuler(T, 0, 0, I[2]);
1437
- s.set(R, n + 1, n + 1, n + 1);
1438
- const Q = e.fromRotationTranslationScale(_, c, o, R);
1439
- s.transformMat4(w, w, Q), s.add(w, w, N), H.set(w[0], w[1]);
1440
- const f = t.pointAtResToCoordinate(H, a);
1431
+ v(t, i, n, o, I) {
1432
+ const g = i.getCenter(), r = i.getTransformOrigin(), a = t.getGLRes(), C = t.coordinateToPointAtRes(g, a, J);
1433
+ C.z = t.altitudeToPoint(g.z, a), s.set(N, C.x, C.y, C.z || 0);
1434
+ const h = t.coordinateToPointAtRes(r, a, J);
1435
+ h.z = t.altitudeToPoint(r.z, a), s.set(R, h.x, h.y, h.z || 0);
1436
+ const w = s.sub(T, N, R), c = A.fromEuler(_, 0, 0, o[2]);
1437
+ s.set(K, n + 1, n + 1, n + 1);
1438
+ const Q = e.fromRotationTranslationScale(H, c, I, K);
1439
+ s.transformMat4(w, w, Q), s.add(w, w, R), J.set(w[0], w[1]);
1440
+ const f = t.pointAtResToCoordinate(J, a);
1441
1441
  return f.z = w[2] / t.altitudeToPoint(1, a), f;
1442
1442
  }
1443
1443
  L(A, e, t) {
@@ -1456,7 +1456,7 @@ class z {
1456
1456
  return this.l;
1457
1457
  }
1458
1458
  getTranslation() {
1459
- return 1 === this.C.length && this.C[0].getTranslation() || K;
1459
+ return 1 === this.C.length && this.C[0].getTranslation() || z;
1460
1460
  }
1461
1461
  getRotation() {
1462
1462
  return this.P;
@@ -1473,7 +1473,7 @@ class z {
1473
1473
  A += s.x, e += s.y, t += s.z || 0;
1474
1474
  }
1475
1475
  A /= s, e /= s, t /= s;
1476
- const i = new o(A, e, t);
1476
+ const i = new g(A, e, t);
1477
1477
  for (let A = 0; A < s; A++) this.C[A].setTransformOrigin(i);
1478
1478
  return i;
1479
1479
  }
@@ -1484,7 +1484,7 @@ class z {
1484
1484
  getTargets() {
1485
1485
  return this.C;
1486
1486
  }
1487
- I() {
1487
+ o() {
1488
1488
  let A = 0;
1489
1489
  const e = this.C.length;
1490
1490
  for (let t = 0; t < e; t++) {
@@ -1498,12 +1498,12 @@ class z {
1498
1498
  }
1499
1499
  }
1500
1500
 
1501
- const G = [ 5, 6, 7, 8, 9, 10 ], j = [ 5, 7, 8, 9, 10 ], Z = [ 2, 4, 11 ], Y = [ 1, 3, 12 ], W = [ 12, 16 ], q = [ 1, 2, 3, 4 ], X = [ 1, 2, 3, 4, 12 ], $ = [], AA = [], eA = [], tA = [], sA = [], iA = [], nA = [];
1501
+ const j = [ 5, 6, 7, 8, 9, 10 ], Z = [ 5, 7, 8, 9, 10 ], Y = [ 2, 4, 11 ], W = [ 1, 3, 12 ], q = [ 12, 16 ], X = [ 1, 2, 3, 4 ], $ = [ 1, 2, 3, 4, 12 ], AA = [], eA = [], tA = [], sA = [], iA = [], nA = [], oA = [];
1502
1502
 
1503
- class IA extends(g(r(a))){
1503
+ class IA extends(r(a(C))){
1504
1504
  constructor(A = {}) {
1505
1505
  super(A), this.options = A, this.mouseAction = "moving", this.U = this.options.mode || "translate",
1506
- this.V = !0, this.TransformHelper = new S, this.S = new z, this.helperScene = new t.Scene([]),
1506
+ this.V = !0, this.TransformHelper = new k, this.S = new G, this.helperScene = new t.Scene([]),
1507
1507
  this.addToMapCount = 0, this.k();
1508
1508
  }
1509
1509
  setCoordinates(A) {
@@ -1529,19 +1529,21 @@ class IA extends(g(r(a))){
1529
1529
  return this.V;
1530
1530
  }
1531
1531
  H(A) {
1532
- G.indexOf(A) > -1 ? this.U = "translate" : Z.indexOf(A) > -1 ? this.U = "rotation" : Y.indexOf(A) > -1 ? this.U = "scaling" : "xyzScale" !== this.U && (this.U = "translate");
1532
+ j.indexOf(A) > -1 ? this.U = "translate" : Y.indexOf(A) > -1 ? this.U = "rotation" : W.indexOf(A) > -1 ? this.U = "scaling" : "xyzScale" !== this.U && (this.U = "translate");
1533
1533
  }
1534
1534
  J() {
1535
1535
  return this.U;
1536
1536
  }
1537
1537
  addTo(A) {
1538
1538
  if (this.map) return this.N(), void console.warn("transform control has been added to a map, it suggest remove from the map before");
1539
- this.addToMapCount++, this.map = A, this.R.addTo(this.map), this.container = A.getContainer(),
1539
+ this.addToMapCount++, this.map = A;
1540
+ const e = A.getLayers((A => A instanceof i))[0];
1541
+ e ? this.R.addTo(e) : this.R.addTo(this.map), this.container = A.getContainer(),
1540
1542
  A.on("dom:mousemove", this.K, this), A.on("dom:mousedown", this.G, this), A.on("dom:mouseup", this.j, this),
1541
1543
  A.on("zooming moving dragrotating", this.Z, this), this.Y();
1542
1544
  }
1543
1545
  k() {
1544
- this.R = new h(`${C}_transformcontrol`), this.T = new w([ 0, 0 ], {
1546
+ this.R = new w(`${h}_transformcontrol`), this.T = new c([ 0, 0 ], {
1545
1547
  symbol: {
1546
1548
  url: "cube",
1547
1549
  modelHeight: 1,
@@ -1609,37 +1611,37 @@ class IA extends(g(r(a))){
1609
1611
  if (!this.layerRenderer) return !1;
1610
1612
  const e = this.q(), t = this.map;
1611
1613
  let s = A;
1612
- A instanceof I || (s = t.coordinateToContainerPoint(new o(A)));
1614
+ A instanceof I || (s = t.coordinateToContainerPoint(new g(A)));
1613
1615
  const i = this.X(s, e, "picked");
1614
1616
  return !(!i || null === i.meshId);
1615
1617
  }
1616
1618
  _() {
1617
1619
  const A = this.TransformHelper.getMeshes("scaling").scaling[0][0], e = 340 / 177;
1618
- A.scaling = [ .6 * e, .6 * e, .6 * e ], this.layerRenderer && (this.IA(A), this.oA());
1620
+ A.scaling = [ .6 * e, .6 * e, .6 * e ], this.layerRenderer && (this.oA(A), this.IA());
1619
1621
  }
1620
- oA() {
1622
+ IA() {
1621
1623
  this.TransformHelper._meshes.translate.forEach((A => {
1622
1624
  for (let e = 0; e < A.length; e++) {
1623
1625
  const t = A[e];
1624
- q.indexOf(t.getUniform("uPickingId")) > -1 && t.material.set("color", t.originColor);
1626
+ X.indexOf(t.getUniform("uPickingId")) > -1 && t.material.set("color", t.originColor);
1625
1627
  }
1626
1628
  }));
1627
1629
  }
1628
- IA(t) {
1629
- const i = this.S.getCoordinates(), n = this.map.coordinateToPointAtRes(i, this.map.getGLRes()), I = [ n.x, n.y, 0 ], o = b(this.map, this.S.getTranslation());
1630
- s.add(I, I, o);
1630
+ oA(t) {
1631
+ const i = this.S.getCoordinates(), n = this.map.coordinateToPointAtRes(i, this.map.getGLRes()), o = [ n.x, n.y, 0 ], I = B(this.map, this.S.getTranslation());
1632
+ s.add(o, o, I);
1631
1633
  const g = s.copy([], t.translate), r = t.scaling;
1632
- let a = m(this.S, this.map);
1633
- a = s.set([], a, a, a), s.multiply(g, g, a), s.multiply(a, a, r), s.add(g, g, I),
1634
+ let a = b(this.S, this.map);
1635
+ a = s.set([], a, a, a), s.multiply(g, g, a), s.multiply(a, a, r), s.add(g, g, o),
1634
1636
  e.fromRotationTranslationScale(t.localTransform, [ 0, 0, 0, 1 ], g, a);
1635
1637
  this.q().forEach((t => {
1636
1638
  const i = t.getUniform("uPickingId");
1637
1639
  if (1 === i || 3 === i || 2 === i || 4 === i) {
1638
1640
  const i = s.copy([], t.translate), n = 170 / 177;
1639
1641
  t.scaling = [ n, n, n ];
1640
- const o = t.scaling, g = t.rotation;
1641
- let r = m(this.S, this.map);
1642
- r = s.set([], r, r, r), s.multiply(i, i, r), s.multiply(r, r, o), s.add(i, i, I);
1642
+ const I = t.scaling, g = t.rotation;
1643
+ let r = b(this.S, this.map);
1644
+ r = s.set([], r, r, r), s.multiply(i, i, r), s.multiply(r, r, I), s.add(i, i, o);
1643
1645
  const a = A.fromEuler([], g[0], g[1], g[2]);
1644
1646
  e.fromRotationTranslationScale(t.localTransform, a, i, r);
1645
1647
  }
@@ -1653,38 +1655,38 @@ class IA extends(g(r(a))){
1653
1655
  }
1654
1656
  eA(A) {
1655
1657
  if ("transform" === this.mouseAction) {
1656
- const A = this.J(), e = b(this.map, this.S.getTranslation()), t = this.S.I();
1657
- let s = null, n = null;
1658
+ const A = this.J(), e = B(this.map, this.S.getTranslation()), t = this.S.o();
1659
+ let s = null, i = null;
1658
1660
  if (e[2] + t < .01 && "z-translate" !== this.iA) s = this.gA(this.currentMousePosition),
1659
- n = this.gA(this.lastMousePosition); else {
1661
+ i = this.gA(this.lastMousePosition); else {
1660
1662
  const A = this.TransformHelper.planeHelper.getMeshes()[0];
1661
- if (s = this.X(this.currentMousePosition, A, "plane"), n = this.X(this.lastMousePosition, A, "plane"),
1662
- !s || null === s.meshId || !n || null === n.meshId) return;
1663
+ if (s = this.X(this.currentMousePosition, A, "plane"), i = this.X(this.lastMousePosition, A, "plane"),
1664
+ !s || null === s.meshId || !i || null === i.meshId) return;
1663
1665
  }
1664
1666
  const o = [ 0, 0, 0 ], g = [ 0, 0, 0 ];
1665
1667
  let r = 0, a = 0, C = 0;
1666
1668
  if ("translate" === A) {
1667
1669
  if ("xy-translate" === this.iA) {
1668
- const A = s.point[0] - n.point[0], e = s.point[1] - n.point[1];
1670
+ const A = s.point[0] - i.point[0], e = s.point[1] - i.point[1];
1669
1671
  o[0] = A, o[1] = e;
1670
1672
  } else if ("x-translate" === this.iA) {
1671
- const A = s.point[0] - n.point[0];
1673
+ const A = s.point[0] - i.point[0];
1672
1674
  o[0] = A;
1673
1675
  } else if ("y-translate" === this.iA) {
1674
- const A = s.point[1] - n.point[1];
1676
+ const A = s.point[1] - i.point[1];
1675
1677
  o[1] = A;
1676
1678
  } else if ("z-translate" === this.iA) {
1677
1679
  let A = 0;
1678
1680
  if (this.rA()) {
1679
- const e = this.map.getGLRes(), t = this.map._pointAtResToContainerPoint(new I(n.point[0], n.point[1]), e), o = this.map._pointAtResToContainerPoint(new I(s.point[0], s.point[1]), e), g = i.length(i.set(tA, s.point[0] - n.point[0], s.point[1] - n.point[1]));
1681
+ const e = this.map.getGLRes(), t = this.map._pointAtResToContainerPoint(new I(i.point[0], i.point[1]), e), o = this.map._pointAtResToContainerPoint(new I(s.point[0], s.point[1]), e), g = n.length(n.set(sA, s.point[0] - i.point[0], s.point[1] - i.point[1]));
1680
1682
  A = o.y < t.y ? g : -g;
1681
- } else A = s.point[2] - n.point[2];
1683
+ } else A = s.point[2] - i.point[2];
1682
1684
  o[2] = A;
1683
1685
  }
1684
- } else if ("rotation" === A) a = this.aA(s.point, n.point), a >= 0 ? this.TransformHelper.o(!0) : this.TransformHelper.o(!1),
1686
+ } else if ("rotation" === A) a = this.aA(s.point, i.point), a >= 0 ? this.TransformHelper.I(!0) : this.TransformHelper.I(!1),
1685
1687
  g[2] += a; else if ("scaling" === A || "xyzScale" === A) {
1686
- const A = this.CA(), e = i.length(i.set(tA, this.firstDownPoint.point[0] - A[0], this.firstDownPoint.point[1] - A[1])), t = i.length(i.set(tA, n.point[0] - A[0], n.point[1] - A[1]));
1687
- r = this.hA(s.point, n.point, A, t), C = this.hA(s.point, n.point, A, e);
1688
+ const A = this.CA(), e = n.length(n.set(sA, this.firstDownPoint.point[0] - A[0], this.firstDownPoint.point[1] - A[1])), t = n.length(n.set(sA, i.point[0] - A[0], i.point[1] - A[1]));
1689
+ r = this.hA(s.point, i.point, A, t), C = this.hA(s.point, i.point, A, e);
1688
1690
  }
1689
1691
  this.TransformHelper.updateMatrix(this.map, this.S, a, C, o), this.S.p(this.iA, o, g, r, .01, this.map, this);
1690
1692
  }
@@ -1692,27 +1694,27 @@ class IA extends(g(r(a))){
1692
1694
  const e = this.q();
1693
1695
  this.lastPickingMesh = e[this.currentPickingObject.meshId];
1694
1696
  }
1695
- hA(A, e, t, s, n) {
1696
- const I = (i.length(i.set(tA, A[0] - t[0], A[1] - t[1])) - i.length(i.set(tA, e[0] - t[0], e[1] - t[1]))) / s;
1697
- return n ? (n[0] - .01) * I : I;
1697
+ hA(A, e, t, s, i) {
1698
+ const o = (n.length(n.set(sA, A[0] - t[0], A[1] - t[1])) - n.length(n.set(sA, e[0] - t[0], e[1] - t[1]))) / s;
1699
+ return i ? (i[0] - .01) * o : o;
1698
1700
  }
1699
1701
  CA() {
1700
- const A = this.map, e = this.S.getCoordinates(), t = A.coordinateToPointAtRes(e, A.getGLRes()), i = s.set(sA, t.x, t.y, 0), n = b(A, this.S.getTranslation());
1702
+ const A = this.map, e = this.S.getCoordinates(), t = A.coordinateToPointAtRes(e, A.getGLRes()), i = s.set(iA, t.x, t.y, 0), n = B(A, this.S.getTranslation());
1701
1703
  return s.add(i, i, n), i;
1702
1704
  }
1703
1705
  $(t) {
1704
- const i = this.TransformHelper.planeHelper.getMeshes()[0][0], n = e.getTranslation(eA, i.localTransform), I = e.getScaling(AA, i.localTransform);
1705
- let o = A.fromEuler($, 0, 0, 0);
1706
+ const i = this.TransformHelper.planeHelper.getMeshes()[0][0], n = e.getTranslation(tA, i.localTransform), o = e.getScaling(eA, i.localTransform);
1707
+ let I = A.fromEuler(AA, 0, 0, 0);
1706
1708
  const g = this.map.getBearing();
1707
- t && !this.rA() ? (o = A.fromEuler($, 90, 0, -g), 0 === i.rotation[0] && (this.tA = !0),
1709
+ t && !this.rA() ? (I = A.fromEuler(AA, 90, 0, -g), 0 === i.rotation[0] && (this.tA = !0),
1708
1710
  s.set(i.rotation, 90, 0, -g)) : (90 === i.rotation[0] && (this.tA = !0), s.set(i.rotation, 0, 0, -g)),
1709
- e.fromRotationTranslationScale(i.localTransform, o, n, I);
1711
+ e.fromRotationTranslationScale(i.localTransform, I, n, o);
1710
1712
  }
1711
1713
  rA() {
1712
1714
  if (this.map.getPitch()) return !1;
1713
1715
  const A = this.map.cameraPosition, e = this.map.coordinateToPointAtRes(this.map.getCenter(), this.map.getGLRes());
1714
1716
  s.set(e, e.x, e.y, 0);
1715
- const t = this.S.getCoordinates(), i = this.map.coordinateToPointAtRes(t, this.map.getGLRes()), n = b(this.map, this.S.getTranslation()), I = s.set(eA, i.x, i.y, 0), o = s.add(I, I, n), g = s.subtract([], A, o), r = s.subtract([], A, e);
1717
+ const t = this.S.getCoordinates(), i = this.map.coordinateToPointAtRes(t, this.map.getGLRes()), n = B(this.map, this.S.getTranslation()), o = s.set(tA, i.x, i.y, 0), I = s.add(o, o, n), g = s.subtract([], A, I), r = s.subtract([], A, e);
1716
1718
  return s.angle(g, r) < 1 / 180 * Math.PI;
1717
1719
  }
1718
1720
  AA() {
@@ -1720,7 +1722,7 @@ class IA extends(g(r(a))){
1720
1722
  if (this.currentPickingObject && null != this.currentPickingObject.meshId) {
1721
1723
  this.wA(), this.lastPickingObject && null != this.lastPickingObject.meshId && this.lastPickingObject.meshId !== this.currentPickingObject.meshId && this.cA();
1722
1724
  const e = A[this.currentPickingObject.meshId];
1723
- if (e && W.indexOf(this.currentPickingObject.pickingId) < 0) if (this.currentPickingObject.pickingId > 100) this.QA(e); else {
1725
+ if (e && q.indexOf(this.currentPickingObject.pickingId) < 0) if (this.currentPickingObject.pickingId > 100) this.QA(e); else {
1724
1726
  const A = [ e.originColor[0], e.originColor[1], e.originColor[2], .8 ];
1725
1727
  e.material.set("color", A), this.fA(e, .5);
1726
1728
  }
@@ -1735,27 +1737,27 @@ class IA extends(g(r(a))){
1735
1737
  }));
1736
1738
  }
1737
1739
  wA() {
1738
- 6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") : j.indexOf(this.currentPickingObject.pickingId) > -1 ? this.map.setCursor("move") : this.map.setCursor("pointer");
1740
+ 6 === this.currentPickingObject.pickingId ? this.map.setCursor("ns-resize") : Z.indexOf(this.currentPickingObject.pickingId) > -1 ? this.map.setCursor("move") : this.map.setCursor("pointer");
1739
1741
  }
1740
1742
  cA() {
1741
1743
  const A = this.lastPickingMesh;
1742
1744
  if (!A) return;
1743
1745
  const e = A.getUniform("uPickingId"), t = this.q();
1744
- j.indexOf(e) > -1 ? t.forEach((A => {
1745
- j.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1746
- })) : X.indexOf(e) > -1 ? t.forEach((A => {
1746
+ Z.indexOf(e) > -1 ? t.forEach((A => {
1747
+ Z.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1748
+ })) : $.indexOf(e) > -1 ? t.forEach((A => {
1747
1749
  const e = A.getUniform("uPickingId");
1748
- q.indexOf(e) > -1 && A.material.set("color", A.originColor);
1750
+ X.indexOf(e) > -1 && A.material.set("color", A.originColor);
1749
1751
  })) : 11 === e && t.forEach((A => {
1750
- q.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1752
+ X.indexOf(A.getUniform("uPickingId")) > -1 && A.material.set("color", A.originColor);
1751
1753
  })), A.material.set("color", A.originColor), A.properties.relatedMeshes && A.properties.relatedMeshes.forEach((A => {
1752
1754
  A.material.set("color", A.originColor);
1753
1755
  }));
1754
1756
  }
1755
1757
  fA(A, e) {
1756
1758
  const t = A.getUniform("uPickingId"), s = this.q();
1757
- j.indexOf(t) > -1 ? s.forEach((t => {
1758
- if (j.indexOf(t.getUniform("uPickingId")) > -1 && t.getUniform("uPickingId") !== A.getUniform("uPickingId")) {
1759
+ Z.indexOf(t) > -1 ? s.forEach((t => {
1760
+ if (Z.indexOf(t.getUniform("uPickingId")) > -1 && t.getUniform("uPickingId") !== A.getUniform("uPickingId")) {
1759
1761
  const A = [ t.originColor[0], t.originColor[1], t.originColor[2], e ];
1760
1762
  t.material.set("color", A);
1761
1763
  }
@@ -1777,8 +1779,8 @@ class IA extends(g(r(a))){
1777
1779
  this.map && this.S && (this.S.M(), this.TransformHelper.updateMatrix(this.map, this.S, 0, 0, [ 0, 0, 0 ]));
1778
1780
  }
1779
1781
  aA(A, e) {
1780
- const t = this.CA(), s = i.set(iA, e[0] - t[0], e[1] - t[1]), n = i.set(nA, A[0] - t[0], A[1] - t[1]), I = Math.atan2(s[1], s[0]);
1781
- return (Math.atan2(n[1], n[0]) - I) / Math.PI * 180;
1782
+ const t = this.CA(), s = n.set(nA, e[0] - t[0], e[1] - t[1]), i = n.set(oA, A[0] - t[0], A[1] - t[1]), o = Math.atan2(s[1], s[0]);
1783
+ return (Math.atan2(i[1], i[0]) - o) / Math.PI * 180;
1782
1784
  }
1783
1785
  sA(A) {
1784
1786
  return this.iA = 113 === A || 114 === A ? "x-scale" : 115 === A || 116 === A ? "z-scale" : 117 === A || 118 === A ? "y-scale" : 119 === A ? "xyz-scale" : 5 === A ? "xy-translate" : 6 === A ? "z-translate" : 7 === A || 9 === A ? "x-translate" : 8 === A || 10 === A ? "y-translate" : 11 === A ? "z-rotate" : "scale",
@@ -1816,10 +1818,10 @@ class IA extends(g(r(a))){
1816
1818
  X(A, e, t) {
1817
1819
  const s = this.map;
1818
1820
  if (!(s && this.DA && this.layerRenderer && this.layerRenderer.canvas)) return null;
1819
- const i = s.getDevicePixelRatio(), n = A.x * i, I = A.y * i, o = this.uA, g = this.layerRenderer.canvas.gl && this.layerRenderer.canvas.gl.wrap;
1820
- (this.tA || g || !this.mA || this.mA !== t) && (this.DA.render(e, o, !0), this.mA = t,
1821
+ const i = s.getDevicePixelRatio(), n = A.x * i, o = A.y * i, I = this.uA, g = this.layerRenderer.canvas.gl && this.layerRenderer.canvas.gl.wrap;
1822
+ (this.tA || g || !this.mA || this.mA !== t) && (this.DA.render(e, I, !0), this.mA = t,
1821
1823
  this.tA = !1);
1822
- return this.DA.pick(n, I, 10, o, {
1824
+ return this.DA.pick(n, o, 10, I, {
1823
1825
  viewMatrix: this.map.viewMatrix,
1824
1826
  projMatrix: this.map.projMatrix,
1825
1827
  returnPoint: !0
@@ -1896,5 +1898,5 @@ IA.mergeOptions({
1896
1898
 
1897
1899
  export { IA as TransformControl };
1898
1900
 
1899
- "undefined" != typeof console && console.log("@maptalks/transform-control v0.105.8");
1901
+ "undefined" != typeof console && console.log("@maptalks/transform-control v0.106.0");
1900
1902
  //# sourceMappingURL=transform-control.es.js.map