@pirireis/webglobeplugins 0.9.11 → 0.9.13

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.
Files changed (179) hide show
  1. package/Math/angle-calculation.js +9 -11
  2. package/Math/arc.js +38 -41
  3. package/Math/bounds/line-bbox.js +79 -83
  4. package/Math/constants.js +4 -9
  5. package/Math/frustum/types.js +1 -2
  6. package/Math/juction/arc-plane.js +33 -36
  7. package/Math/juction/line-sphere.js +15 -18
  8. package/Math/juction/plane-plane.js +20 -23
  9. package/Math/line.js +42 -47
  10. package/Math/methods.js +69 -92
  11. package/Math/plane.js +33 -38
  12. package/Math/quaternion.js +48 -55
  13. package/Math/types.js +1 -2
  14. package/Math/utils.js +2 -4
  15. package/Math/vec3.js +46 -52
  16. package/algorithms/search-binary.js +5 -8
  17. package/altitude-locator/draw-subset-obj.js +8 -11
  18. package/altitude-locator/plugin.js +114 -133
  19. package/altitude-locator/types.js +1 -3
  20. package/arrowfield/adaptor.js +3 -7
  21. package/arrowfield/index.js +3 -10
  22. package/arrowfield/plugin.js +63 -69
  23. package/bearing-line/index.js +2 -8
  24. package/bearing-line/plugin.js +218 -248
  25. package/circle-line-chain/chain-list-map.js +82 -92
  26. package/circle-line-chain/plugin.js +147 -182
  27. package/circle-line-chain/util.js +1 -5
  28. package/compass-rose/compass-rose-padding-flat.js +111 -140
  29. package/compass-rose/compass-text-writer.js +63 -75
  30. package/compass-rose/index.js +3 -7
  31. package/compassrose/compassrose.js +50 -57
  32. package/compassrose/index.js +2 -8
  33. package/heatwave/index.js +3 -10
  34. package/heatwave/isobar/objectarraylabels.js +50 -56
  35. package/heatwave/isobar/plugin.js +111 -170
  36. package/heatwave/isobar/quadtreecontours.js +78 -96
  37. package/heatwave/plugins/heatwaveglobeshell.js +73 -94
  38. package/index.js +12 -58
  39. package/package.json +1 -1
  40. package/partialrings/buffer-manager.js +32 -70
  41. package/partialrings/index.js +2 -41
  42. package/partialrings/plugin.js +55 -98
  43. package/partialrings/program.js +141 -59
  44. package/pin/pin-object-array.js +89 -97
  45. package/pin/pin-point-totem.js +21 -22
  46. package/point-heat-map/adaptors/timetracksplugin-format-to-this.js +11 -14
  47. package/point-heat-map/plugin-webworker.js +45 -53
  48. package/point-heat-map/point-to-heat-map-flow.js +46 -51
  49. package/point-tracks/key-methods.js +2 -5
  50. package/point-tracks/plugin.js +141 -170
  51. package/programs/arrowfield/index.js +2 -7
  52. package/programs/arrowfield/logic.js +172 -67
  53. package/programs/arrowfield/object.js +35 -43
  54. package/programs/data2legend/density-to-legend.js +47 -26
  55. package/programs/data2legend/point-to-density-texture.js +56 -34
  56. package/programs/float2legendwithratio/index.js +2 -8
  57. package/programs/float2legendwithratio/logic.js +88 -45
  58. package/programs/float2legendwithratio/object.js +45 -54
  59. package/programs/globe-util/is-globe-moved.js +10 -13
  60. package/programs/globeshell/index.js +2 -8
  61. package/programs/globeshell/wiggle/index.js +2 -8
  62. package/programs/globeshell/wiggle/logic.js +191 -101
  63. package/programs/globeshell/wiggle/object.js +35 -43
  64. package/programs/helpers/blender/program.js +36 -22
  65. package/programs/helpers/fadeaway/index.js +2 -7
  66. package/programs/helpers/fadeaway/logic.js +36 -17
  67. package/programs/helpers/fadeaway/object.js +11 -18
  68. package/programs/helpers/index.js +2 -8
  69. package/programs/index.js +9 -58
  70. package/programs/line-on-globe/angled-line.js +95 -39
  71. package/programs/line-on-globe/circle-accurate-3d.js +86 -39
  72. package/programs/line-on-globe/circle-accurate-flat.js +116 -64
  73. package/programs/line-on-globe/circle-accurate.js +113 -46
  74. package/programs/line-on-globe/circle.js +106 -44
  75. package/programs/line-on-globe/degree-padding-around-circle-3d.js +89 -42
  76. package/programs/line-on-globe/lines-color-instanced-flat.js +84 -43
  77. package/programs/line-on-globe/linestrip.js +126 -63
  78. package/programs/line-on-globe/naive-accurate-flexible.js +126 -59
  79. package/programs/line-on-globe/to-the-surface.js +62 -35
  80. package/programs/line-on-globe/util.js +2 -5
  81. package/programs/picking/pickable-renderer.js +127 -46
  82. package/programs/point-on-globe/element-globe-surface-glow.js +83 -46
  83. package/programs/point-on-globe/element-point-glow.js +112 -47
  84. package/programs/point-on-globe/square-pixel-point.js +80 -34
  85. package/programs/programcache.js +14 -19
  86. package/programs/rings/distancering/circleflatprogram.js +76 -70
  87. package/programs/rings/distancering/circlepaddingfreeangleprogram.js +168 -194
  88. package/programs/rings/distancering/circlepaddysharedbuffer.js +121 -200
  89. package/programs/rings/distancering/index.js +5 -14
  90. package/programs/rings/distancering/paddyflatprogram.js +87 -70
  91. package/programs/rings/distancering/paddyflatprogram2d.js +89 -72
  92. package/programs/rings/distancering/paddyflatprogram3d.js +87 -70
  93. package/programs/rings/index.js +1 -17
  94. package/programs/rings/partial-ring/piece-of-pie.js +144 -44
  95. package/programs/totems/camerauniformblock.js +65 -56
  96. package/programs/totems/canvas-webglobe-info.js +49 -45
  97. package/programs/totems/gpu-selection-uniform-block.js +45 -45
  98. package/programs/totems/index.js +2 -40
  99. package/programs/two-d/pixel-padding-for-compass.js +94 -36
  100. package/programs/util.js +7 -10
  101. package/programs/vectorfields/index.js +3 -23
  102. package/programs/vectorfields/logics/drawrectangleparticles.js +73 -35
  103. package/programs/vectorfields/logics/index.js +4 -12
  104. package/programs/vectorfields/logics/pixelbased.js +94 -41
  105. package/programs/vectorfields/logics/ubo.js +32 -32
  106. package/programs/vectorfields/pingpongbuffermanager.js +30 -37
  107. package/rangerings/enum.js +2 -5
  108. package/rangerings/index.js +5 -15
  109. package/rangerings/plugin.js +223 -286
  110. package/rangerings/rangeringangletext.js +122 -137
  111. package/rangerings/ring-account.js +53 -75
  112. package/shaders/fragment-toy/firework.js +55 -4
  113. package/shaders/fragment-toy/singularity.js +56 -5
  114. package/timetracks/adaptors-line-strip.js +27 -44
  115. package/timetracks/adaptors.js +48 -67
  116. package/timetracks/index.js +5 -19
  117. package/timetracks/plugin-line-strip.js +65 -79
  118. package/timetracks/plugin.js +71 -85
  119. package/timetracks/program-line-strip.js +297 -107
  120. package/timetracks/program.js +421 -118
  121. package/timetracks/programpoint-line-strip.js +98 -48
  122. package/timetracks/programpoint.js +91 -48
  123. package/util/account/bufferoffsetmanager.js +72 -98
  124. package/util/account/index.js +3 -23
  125. package/util/account/single-attribute-buffer-management/buffer-manager.js +44 -48
  126. package/util/account/single-attribute-buffer-management/buffer-orchestrator.js +68 -98
  127. package/util/account/single-attribute-buffer-management/index.js +4 -9
  128. package/util/account/single-attribute-buffer-management/object-store.js +29 -34
  129. package/util/account/single-attribute-buffer-management/types.js +1 -2
  130. package/util/account/util.js +2 -8
  131. package/util/algorithms/search-binary.js +5 -8
  132. package/util/check/get.js +5 -9
  133. package/util/check/typecheck.js +13 -24
  134. package/util/geometry/index.js +10 -18
  135. package/util/gl-util/buffer/attribute-loader.js +10 -26
  136. package/util/gl-util/buffer/index.js +2 -5
  137. package/util/gl-util/draw-options/methods.js +10 -15
  138. package/util/gl-util/uniform-block/manager.js +69 -72
  139. package/util/heatwavedatamanager/datamanager.js +56 -119
  140. package/util/heatwavedatamanager/index.js +3 -10
  141. package/util/heatwavedatamanager/pointcoordinatesdatacalculator.js +38 -47
  142. package/util/heatwavedatamanager/pointcoordsmeta.js +9 -13
  143. package/util/index.js +13 -57
  144. package/util/interpolation/timetrack/index.js +2 -5
  145. package/util/interpolation/timetrack/timetrack-interpolator.js +30 -36
  146. package/util/interpolation/timetrack/web-worker-str.js +180 -5
  147. package/util/interpolation/timetrack/web-worker.js +4 -6
  148. package/util/jshelpers/data-filler.js +8 -11
  149. package/util/jshelpers/equality.js +1 -3
  150. package/util/jshelpers/index.js +2 -37
  151. package/util/jshelpers/timefilters.js +8 -10
  152. package/util/picking/fence.js +8 -11
  153. package/util/picking/picker-displayer.js +49 -58
  154. package/util/programs/draw-texture-on-canvas.js +41 -26
  155. package/util/programs/index.js +1 -17
  156. package/util/programs/shapesonglobe.js +104 -68
  157. package/util/programs/supersampletotextures.js +45 -43
  158. package/util/programs/texturetoglobe.js +99 -52
  159. package/util/shaderfunctions/geometrytransformations.js +323 -35
  160. package/util/shaderfunctions/index.js +2 -18
  161. package/util/shaderfunctions/nodata.js +8 -5
  162. package/util/shaderfunctions/noisefunctions.js +40 -12
  163. package/util/surface-line-data/arcs-to-cuts.js +20 -23
  164. package/util/webglobe/gldefaultstates.js +1 -4
  165. package/util/webglobe/index.js +2 -18
  166. package/util/webglobe/rasteroverlay.js +36 -41
  167. package/util/webglobjectbuilders.js +70 -93
  168. package/util/webglobjectbuilders1.js +63 -82
  169. package/waveparticles/adaptor.js +7 -10
  170. package/waveparticles/index.js +3 -10
  171. package/waveparticles/plugin.js +82 -90
  172. package/wind/imagetovectorfieldandmagnitude.js +16 -19
  173. package/wind/index.js +5 -14
  174. package/wind/plugin.js +454 -291
  175. package/wind/vectorfieldimage.js +6 -8
  176. package/write-text/attached-text-writer.js +48 -54
  177. package/write-text/context-text.js +52 -63
  178. package/write-text/context-text3.js +71 -80
  179. package/write-text/index.js +1 -5
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // TODO: REMOVE THIS
4
- var webglobe_1 = require("@pirireis/webglobe");
5
- var object = {
2
+ import { CSGlobe, CSObjectTypes, CSIconTypes, CSObjectArrayUpdateTypes, GlobeManager } from "@pirireis/webglobe";
3
+ const object = {
6
4
  "displayName": "CompassRose",
7
5
  "layerType": 3,
8
6
  "wkbGeom": null,
@@ -167,29 +165,28 @@ var object = {
167
165
  "flashGeo": false
168
166
  }
169
167
  };
170
- var setIconSize = function (object, size) {
168
+ const setIconSize = (object, size) => {
171
169
  object.style.icon.sizeX = size;
172
170
  object.style.icon.sizeY = size;
173
171
  object.style.icon.radius = Math.ceil(size / 2);
174
172
  };
175
- var setMapName = function (object, mapName) {
173
+ const setMapName = (object, mapName) => {
176
174
  object.style.icon.mapName = mapName;
177
175
  };
178
- var setIconName = function (object, name) {
176
+ const setIconName = (object, name) => {
179
177
  object.style.icon.name = name;
180
178
  };
181
- var setData = function (object, data) {
179
+ const setData = (object, data) => {
182
180
  object.data = data;
183
181
  };
184
- var addSingleImageIconMap = function (symbolSet) { return function (url) {
185
- webglobe_1.GlobeManager.api_AddIconMap(symbolSet, url, null);
186
- }; };
187
- var setFIDKey = function (object, key) {
182
+ const addSingleImageIconMap = symbolSet => url => {
183
+ GlobeManager.api_AddIconMap(symbolSet, url, null);
184
+ };
185
+ const setFIDKey = (object, key) => {
188
186
  object.style.fidKey = key;
189
187
  };
190
- var CompassRose = /** @class */ (function () {
191
- function CompassRose(id, globe, _a) {
192
- var _b = _a.size, size = _b === void 0 ? 100 : _b, _c = _a.primaryKey, primaryKey = _c === void 0 ? "__key__" : _c, _d = _a.symbolSet, symbolSet = _d === void 0 ? "compassRose" : _d, _e = _a.iconSet, iconSet = _e === void 0 ? null : _e, _f = _a.imageURL, imageURL = _f === void 0 ? null : _f, _g = _a.data, data = _g === void 0 ? null : _g;
188
+ export default class CompassRose {
189
+ constructor(id, globe, { size = 100, primaryKey = "__key__", symbolSet = "compassRose", iconSet = null, imageURL = null, data = null }) {
193
190
  this.id = id;
194
191
  this.globe = globe;
195
192
  this._idCollector = new Set();
@@ -207,35 +204,35 @@ var CompassRose = /** @class */ (function () {
207
204
  if (data)
208
205
  this.setControlledData(data);
209
206
  }
210
- CompassRose.prototype.setIconSize = function (size) {
211
- var _a = this, object = _a.object, globe = _a.globe;
207
+ setIconSize(size) {
208
+ const { object, globe } = this;
212
209
  setIconSize(object, size);
213
210
  globe.ObjectArray.StyleChanged(object);
214
- };
215
- CompassRose.prototype.setMapName = function (mapName) {
216
- var _a = this, object = _a.object, globe = _a.globe;
211
+ }
212
+ setMapName(mapName) {
213
+ const { object, globe } = this;
217
214
  setMapName(object, mapName);
218
215
  globe.ObjectArray.StyleChanged(object);
219
- };
220
- CompassRose.prototype.flush = function () {
216
+ }
217
+ flush() {
221
218
  this._idCollector.clear();
222
219
  this._setData({ coords: [], coordsZ: [], attribs: [] });
223
- };
224
- CompassRose.prototype.insert = function (data) {
225
- var updateBucket = {
220
+ }
221
+ insert(data) {
222
+ const updateBucket = {
226
223
  coords: [],
227
224
  coordsZ: [],
228
225
  attribs: [],
229
226
  };
230
- var addBucket = {
227
+ const addBucket = {
231
228
  coords: [],
232
229
  coordsZ: [],
233
230
  attribs: [],
234
231
  };
235
- var bucket;
236
- for (var i = 0; i < data.attribs.length; i++) {
237
- var currentPayload = data.attribs[i];
238
- var id = currentPayload[this.primaryKey];
232
+ let bucket;
233
+ for (let i = 0; i < data.attribs.length; i++) {
234
+ const currentPayload = data.attribs[i];
235
+ const id = currentPayload[this.primaryKey];
239
236
  if (this._idCollector.has(id)) {
240
237
  bucket = updateBucket;
241
238
  }
@@ -248,53 +245,49 @@ var CompassRose = /** @class */ (function () {
248
245
  bucket.attribs.push(currentPayload);
249
246
  }
250
247
  if (addBucket.coords.length > 0) {
251
- this._updateData(addBucket, webglobe_1.CSObjectArrayUpdateTypes.ADD, { attribs: false, icon: false, label: false, heading: false });
248
+ this._updateData(addBucket, CSObjectArrayUpdateTypes.ADD, { attribs: false, icon: false, label: false, heading: false });
252
249
  }
253
250
  if (updateBucket.coords.length > 0) {
254
- this._updateData(updateBucket, webglobe_1.CSObjectArrayUpdateTypes.UPDATE, { attribs: false, icon: false, label: false, heading: false });
251
+ this._updateData(updateBucket, CSObjectArrayUpdateTypes.UPDATE, { attribs: false, icon: false, label: false, heading: false });
255
252
  }
256
- };
257
- CompassRose.prototype.delete = function (dataIDs) {
258
- var _this = this;
259
- var deleteBucket = {
253
+ }
254
+ delete(dataIDs) {
255
+ const deleteBucket = {
260
256
  coords: [],
261
257
  coordsZ: [],
262
258
  attribs: [],
263
259
  };
264
- dataIDs.forEach(function (id) {
265
- var _a;
266
- if (_this._idCollector.has(id)) {
267
- _this._idCollector.delete(id);
260
+ dataIDs.forEach(id => {
261
+ if (this._idCollector.has(id)) {
262
+ this._idCollector.delete(id);
268
263
  deleteBucket.coords.push(0, 0);
269
264
  deleteBucket.coordsZ.push(0);
270
265
  // also can be written as follows
271
- deleteBucket.attribs.push((_a = {},
272
- _a[_this.primaryKey] = id,
273
- _a));
266
+ deleteBucket.attribs.push({
267
+ [this.primaryKey]: id,
268
+ });
274
269
  }
275
270
  });
276
271
  if (deleteBucket.coords.length > 0) {
277
- this._updateData(deleteBucket, webglobe_1.CSObjectArrayUpdateTypes.DELETE);
272
+ this._updateData(deleteBucket, CSObjectArrayUpdateTypes.DELETE);
278
273
  }
279
- };
280
- CompassRose.prototype.removeFromMap = function () {
274
+ }
275
+ removeFromMap() {
281
276
  this.globe.ObjectArray.Delete(this.id);
282
- };
277
+ }
283
278
  // private
284
- CompassRose.prototype._setData = function (data) {
285
- var _a = this, globe = _a.globe, object = _a.object;
279
+ _setData(data) {
280
+ const { globe, object } = this;
286
281
  globe.ObjectArray.SetData(object, [data]);
287
- };
282
+ }
288
283
  /**
289
284
  * @param {PointObjectArray} data
290
285
  * @param {CSObjectArrayUpdateTypes} operation
291
286
  * @param {CanChangeOptions} [canChange]
292
287
  */
293
- CompassRose.prototype._updateData = function (data, operation, canChange) {
294
- var _a = this, globe = _a.globe, object = _a.object;
288
+ _updateData(data, operation, canChange) {
289
+ const { globe, object } = this;
295
290
  globe.ObjectArray.UpdateData(object, operation, [data], canChange);
296
- };
297
- return CompassRose;
298
- }());
299
- exports.default = CompassRose;
300
- var getID = function (data, primaryKey) { return data.attribs[primaryKey]; };
291
+ }
292
+ }
293
+ const getID = (data, primaryKey) => data.attribs[primaryKey];
@@ -1,8 +1,2 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CompassRose = void 0;
7
- var compassrose_1 = __importDefault(require("./compassrose"));
8
- exports.CompassRose = compassrose_1.default;
1
+ import CompassRose from "./compassrose";
2
+ export { CompassRose };
package/heatwave/index.js CHANGED
@@ -1,10 +1,3 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.IsobarRasterToVector = exports.HeatWavePlugin = void 0;
7
- var heatwaveglobeshell_1 = __importDefault(require("./plugins/heatwaveglobeshell"));
8
- exports.HeatWavePlugin = heatwaveglobeshell_1.default;
9
- var plugin_1 = require("./isobar/plugin");
10
- Object.defineProperty(exports, "IsobarRasterToVector", { enumerable: true, get: function () { return plugin_1.IsobarRasterToVector; } });
1
+ import HeatWavePlugin from './plugins/heatwaveglobeshell';
2
+ import { IsobarRasterToVector } from './isobar/plugin';
3
+ export { HeatWavePlugin, IsobarRasterToVector };
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var webglobe_1 = require("@pirireis/webglobe");
1
+ import { CSGlobe, CSIconTypes, CSObjectTypes, CSObjectArrayUpdateTypes, } from "@pirireis/webglobe";
4
2
  /**
5
3
  * @typedef {Object} IconPayload
6
4
  * @property {string} app6DCode
@@ -22,13 +20,12 @@ var webglobe_1 = require("@pirireis/webglobe");
22
20
  * @property {number[]} coordsZ [z1, z2, ....]
23
21
  * @property {PointPayload[]} attribs
24
22
  */
25
- var ObjectArrayLabels = /** @class */ (function () {
23
+ class ObjectArrayLabels {
26
24
  /**
27
25
  * @param {number | string} id
28
26
  * @param {CSGlobe} globe
29
27
  */
30
- function ObjectArrayLabels(id, globe, labelStyle) {
31
- if (labelStyle === void 0) { labelStyle = null; }
28
+ constructor(id, globe, labelStyle = null) {
32
29
  this.id = id;
33
30
  this.setGlobe(globe);
34
31
  this.data = [
@@ -39,7 +36,7 @@ var ObjectArrayLabels = /** @class */ (function () {
39
36
  },
40
37
  ];
41
38
  this.primaryKey = "id";
42
- this.objectType = webglobe_1.CSObjectTypes.POINT;
39
+ this.objectType = CSObjectTypes.POINT;
43
40
  this.filter = null;
44
41
  this.bbox = null;
45
42
  this.startLod = 2;
@@ -49,7 +46,7 @@ var ObjectArrayLabels = /** @class */ (function () {
49
46
  this._idCollector = new Set();
50
47
  this._setStyle(labelStyle);
51
48
  }
52
- ObjectArrayLabels.prototype._setStyle = function (labelStyle) {
49
+ _setStyle(labelStyle) {
53
50
  this.style = this.globe.ObjectArray.GetDefaultStyle();
54
51
  if (labelStyle) {
55
52
  this.style.labels[0] = labelStyle;
@@ -67,54 +64,53 @@ var ObjectArrayLabels = /** @class */ (function () {
67
64
  }
68
65
  this.style.labels[0].text = "${value}";
69
66
  this.style.fidKey = this.primaryKey;
70
- this.style.iconType = webglobe_1.CSIconTypes.NOICON; // milIcon ekleyebilmek için icon tipi MAP olmalı
71
- };
67
+ this.style.iconType = CSIconTypes.NOICON; // milIcon ekleyebilmek için icon tipi MAP olmalı
68
+ }
72
69
  /**
73
70
  * @param {CSGlobe} [globe]
74
71
  */
75
- ObjectArrayLabels.prototype.setGlobe = function (globe) {
72
+ setGlobe(globe) {
76
73
  if (!globe)
77
74
  return;
78
75
  this.globe = globe;
79
- };
80
- ObjectArrayLabels.prototype.addToMap = function () {
76
+ }
77
+ addToMap() {
81
78
  this.globe.ObjectArray.Add(this);
82
- };
83
- ObjectArrayLabels.prototype.removeFromMap = function () {
79
+ }
80
+ removeFromMap() {
84
81
  this.flush();
85
82
  this.globe.ObjectArray.Delete(this.id);
86
- };
83
+ }
87
84
  /**
88
85
  * Haritaya kullanılacak veriyi verir. Her çağrıldığında tüm hesaplamalar yeniden yapılır
89
86
  * @param {PointObjectArray} data
90
87
  */
91
- ObjectArrayLabels.prototype.setData = function (data) {
88
+ setData(data) {
92
89
  this.globe.ObjectArray.SetData(this, [data]);
93
- };
90
+ }
94
91
  /**
95
92
  * @param {PointObjectArray} data
96
93
  * @param {CSObjectArrayUpdateTypes} operation
97
94
  * @param {CanChangeOptions} [canChange]
98
95
  */
99
- ObjectArrayLabels.prototype.updateData = function (data, operation, canChange) {
96
+ updateData(data, operation, canChange) {
100
97
  this.globe.ObjectArray.UpdateData(this, operation, [data], canChange);
101
- };
102
- ObjectArrayLabels.prototype.flush = function () {
103
- var deleteBucket = {
98
+ }
99
+ flush() {
100
+ const deleteBucket = {
104
101
  coords: [],
105
102
  coordsZ: [],
106
103
  attribs: [],
107
104
  };
108
105
  this.setData(deleteBucket);
109
106
  this._idCollector = new Set();
110
- };
107
+ }
111
108
  /**
112
109
  * Haritaya kullanılacak veriyi verir. Her çağrıldığında tüm hesaplamalar yeniden yapılmaz, ancak ön hesaplama maliyeti vardır
113
110
  * @param {PointObjectArray} data
114
111
  */
115
- ObjectArrayLabels.prototype.setControlledData = function (data) {
116
- var _this = this;
117
- var paritalData = {
112
+ setControlledData(data) {
113
+ const paritalData = {
118
114
  add: {
119
115
  coords: [],
120
116
  coordsZ: [],
@@ -142,19 +138,19 @@ var ObjectArrayLabels = /** @class */ (function () {
142
138
  if (this._idCollector.size === 0) {
143
139
  this.setData(data);
144
140
  // Eklenen id'ler set edildi
145
- for (var i = 0; i < data.attribs.length; i++) {
146
- var currentPayload = data.attribs[i];
147
- var id = currentPayload[this.primaryKey];
141
+ for (let i = 0; i < data.attribs.length; i++) {
142
+ const currentPayload = data.attribs[i];
143
+ const id = currentPayload[this.primaryKey];
148
144
  this._idCollector.add(id);
149
145
  }
150
146
  return;
151
147
  }
152
148
  /** @type {Set<string>} */
153
- var dataIds = new Set();
154
- for (var i = 0; i < data.attribs.length; i++) {
155
- var currentPayload = data.attribs[i];
156
- var id = currentPayload[this.primaryKey];
157
- var bucket = paritalData.add;
149
+ const dataIds = new Set();
150
+ for (let i = 0; i < data.attribs.length; i++) {
151
+ const currentPayload = data.attribs[i];
152
+ const id = currentPayload[this.primaryKey];
153
+ let bucket = paritalData.add;
158
154
  dataIds.add(id);
159
155
  if (this._idCollector.has(id)) {
160
156
  bucket = paritalData.update;
@@ -167,40 +163,38 @@ var ObjectArrayLabels = /** @class */ (function () {
167
163
  bucket.attribs.push(currentPayload);
168
164
  }
169
165
  // Artık varolmayan elemenları sil
170
- var deleteBucket = paritalData.delete;
171
- this._idCollector.forEach(function (id) {
172
- var _a;
166
+ const deleteBucket = paritalData.delete;
167
+ this._idCollector.forEach((id) => {
173
168
  if (!dataIds.has(id)) {
174
- _this._idCollector.delete(id);
169
+ this._idCollector.delete(id);
175
170
  deleteBucket.coords.push(0, 0);
176
171
  deleteBucket.coordsZ.push(0);
177
- deleteBucket.attribs.push((_a = {},
178
- _a[_this.primaryKey] = id,
179
- _a));
172
+ deleteBucket.attribs.push({
173
+ [this.primaryKey]: id,
174
+ });
180
175
  }
181
176
  });
182
177
  if (paritalData.add.coords.length > 0) {
183
- this.updateData(paritalData.add, webglobe_1.CSObjectArrayUpdateTypes.ADD);
178
+ this.updateData(paritalData.add, CSObjectArrayUpdateTypes.ADD);
184
179
  }
185
180
  if (paritalData.update.coords.length > 0) {
186
- this.updateData(paritalData.update, webglobe_1.CSObjectArrayUpdateTypes.UPDATE, paritalData.canChange);
181
+ this.updateData(paritalData.update, CSObjectArrayUpdateTypes.UPDATE, paritalData.canChange);
187
182
  }
188
183
  if (paritalData.delete.coords.length > 0) {
189
- this.updateData(paritalData.delete, webglobe_1.CSObjectArrayUpdateTypes.DELETE);
184
+ this.updateData(paritalData.delete, CSObjectArrayUpdateTypes.DELETE);
190
185
  }
191
- };
192
- ObjectArrayLabels.prototype.setPrimarykey = function (key) {
186
+ }
187
+ setPrimarykey(key) {
193
188
  this.primaryKey = key;
194
- };
195
- ObjectArrayLabels.prototype.setSymbolSet = function (symbolSet) {
189
+ }
190
+ setSymbolSet(symbolSet) {
196
191
  this.symbolSet = symbolSet;
197
- };
198
- ObjectArrayLabels.prototype.getLabelStyle = function () {
192
+ }
193
+ getLabelStyle() {
199
194
  return this.style.labels[0];
200
- };
201
- ObjectArrayLabels.prototype.setLabelStyle = function (style) {
195
+ }
196
+ setLabelStyle(style) {
202
197
  this.style.labels[0] = style;
203
- };
204
- return ObjectArrayLabels;
205
- }());
206
- exports.default = ObjectArrayLabels;
198
+ }
199
+ }
200
+ export default ObjectArrayLabels;