@pirireis/webglobeplugins 0.15.27 → 0.15.28

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirireis/webglobeplugins",
3
- "version": "0.15.27",
3
+ "version": "0.15.28",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -185,8 +185,8 @@ export class CircleLineChainPlugin {
185
185
  for (const chainKey of chainKeys) {
186
186
  const keys = this._chainListMap.deleteChainAndReturnChainKeys(chainKey, this._textWritersMap);
187
187
  if (keys.length <= 1) {
188
- console.warn("No chains were deleted, chainKeys might be invalid.");
189
- return;
188
+ console.warn(`Deleted chain ${chainKey}, was too small to be displayed.`);
189
+ continue;
190
190
  }
191
191
  keys.pop(); // Remove the last key which which is destination of the last circle
192
192
  this.linePlugin?.deleteBulk(keys);
@@ -216,6 +216,11 @@ export class CircleLineChainPlugin {
216
216
  console.warn("CircleLineChainPlugin is freed, cannot update nodes properties.");
217
217
  return;
218
218
  }
219
+ const hasChain = this._chainListMap.hasChain(chainKey);
220
+ if (!hasChain) {
221
+ console.warn(`Chain with key ${chainKey} not found.`);
222
+ return;
223
+ }
219
224
  this._chainListMap.updateNodesProperties(chainKey, nodesAndPropertyList);
220
225
  this._cleanChainsFromSemiPlugins([chainKey]);
221
226
  this._reconstructChains([chainKey]);
@@ -348,6 +348,10 @@ export class CircleOnTerrainPlugin {
348
348
  const [{ radius, center, height = null, msl = null }, circleForAzimuthCalc] = this.circleMap.get(key);
349
349
  const closestAzimuthAngle = CircleMethods.closestAzimuthAngle(circleForAzimuthCalc, cameraPosition);
350
350
  const stregthLevel = defineStregthLevel(currentLOD, radius);
351
+ if (typeof stregthLevel !== "number") {
352
+ console.warn(`CircleOnTerrainPlugin: Circle ${key} has invalid strength level for current LOD ${currentLOD}. Skipping., radius: ${radius}, stregthLevel: ${stregthLevel}`);
353
+ continue;
354
+ }
351
355
  if (stregthLevel < 0) {
352
356
  console.warn(`CircleOnTerrainPlugin: Circle ${key} has too small radius for current LOD ${currentLOD}. Skipping., radius: ${radius}, stregthLevel: ${stregthLevel}`);
353
357
  continue;