@pirireis/webglobeplugins 0.15.29 → 0.15.32

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.29",
3
+ "version": "0.15.32",
4
4
  "main": "index.js",
5
5
  "author": "Toprak Nihat Deniz Ozturk",
6
6
  "license": "MIT",
@@ -26,15 +26,23 @@ export class ChainListMap {
26
26
  if (!chain)
27
27
  return;
28
28
  let frontIndex = null;
29
+ let existingNodeIndex = null;
29
30
  for (let i = 0; i < chain.length; i++) {
30
31
  const n_ode = chain[i];
31
32
  if (n_ode.key === node.key) {
32
- throw new Error("Chain node already exists");
33
+ existingNodeIndex = i;
33
34
  }
34
35
  if (n_ode.key === theNodeKeyFront) {
35
36
  frontIndex = i;
36
37
  }
37
38
  }
39
+ // If node with same key exists, overwrite it
40
+ if (existingNodeIndex !== null) {
41
+ node.__identity__ = this.keyMethod(chainKey, node.key);
42
+ chain[existingNodeIndex] = node;
43
+ this._resetIndexChain(chainKey);
44
+ return;
45
+ }
38
46
  if (theNodeKeyFront !== null) {
39
47
  if (frontIndex !== null) {
40
48
  chain.splice(frontIndex, 0, node);
@@ -1 +1,2 @@
1
- "use strict";
1
+ export const ENUM_HIDE = Object.freeze({ SHOW: 0, HIDE: 1, HIDE_1_DEGREE_PADDINGS: 2 });
2
+ export const ENUM_TEXT_HIDE = Object.freeze({ SHOW: 0, HIDE: 1 });