mol_plot_all 1.2.143 → 1.2.147

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/node.esm.js CHANGED
@@ -1946,16 +1946,50 @@ var $;
1946
1946
  "use strict";
1947
1947
  var $;
1948
1948
  (function ($) {
1949
+ function $mol_guid(length = 8, exists = () => false) {
1950
+ for (;;) {
1951
+ let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
1952
+ if (exists(id))
1953
+ continue;
1954
+ return id;
1955
+ }
1956
+ }
1957
+ $.$mol_guid = $mol_guid;
1958
+ })($ || ($ = {}));
1959
+ //guid.js.map
1960
+ ;
1961
+ "use strict";
1962
+ var $;
1963
+ (function ($) {
1964
+ const keys = new WeakMap();
1949
1965
  function $mol_key(value) {
1950
1966
  if (!value)
1951
1967
  return JSON.stringify(value);
1952
1968
  if (typeof value !== 'object' && typeof value !== 'function')
1953
1969
  return JSON.stringify(value);
1954
- if (Array.isArray(value))
1955
- return JSON.stringify(value);
1956
- if (Object.getPrototypeOf(Object.getPrototypeOf(value)) === null)
1957
- return JSON.stringify(value);
1958
- return value;
1970
+ return JSON.stringify(value, (field, value) => {
1971
+ if (!value)
1972
+ return value;
1973
+ if (typeof value !== 'object' && typeof value !== 'function')
1974
+ return value;
1975
+ if (Array.isArray(value))
1976
+ return value;
1977
+ const proto = Reflect.getPrototypeOf(value);
1978
+ if (!proto)
1979
+ return value;
1980
+ if (Reflect.getPrototypeOf(proto) === null)
1981
+ return value;
1982
+ if ('toJSON' in value)
1983
+ return value;
1984
+ if (value instanceof RegExp)
1985
+ return value.toString();
1986
+ let key = keys.get(value);
1987
+ if (key)
1988
+ return key;
1989
+ key = $.$mol_guid();
1990
+ keys.set(value, key);
1991
+ return key;
1992
+ });
1959
1993
  }
1960
1994
  $.$mol_key = $mol_key;
1961
1995
  })($ || ($ = {}));
@@ -3539,9 +3573,9 @@ var $;
3539
3573
  }
3540
3574
  if (event instanceof WheelEvent) {
3541
3575
  this.pointer_events([event]);
3542
- if (event.ctrlKey)
3543
- return this.action_type('zoom');
3544
- return this.action_type('pan');
3576
+ if (event.shiftKey)
3577
+ return this.action_type('pan');
3578
+ return this.action_type('zoom');
3545
3579
  }
3546
3580
  return this.action_type('');
3547
3581
  }
@@ -3686,7 +3720,7 @@ var $;
3686
3720
  }
3687
3721
  if (action_type === 'pan') {
3688
3722
  const pan_prev = this.pan();
3689
- const pan_next = new $.$mol_vector_2d(pan_prev.x - (event.shiftKey ? event.deltaY : event.deltaX), pan_prev.y - (event.shiftKey ? event.deltaX : event.deltaY));
3723
+ const pan_next = new $.$mol_vector_2d(pan_prev.x - event.deltaX, pan_prev.y - event.deltaY);
3690
3724
  this.pan(pan_next);
3691
3725
  }
3692
3726
  }
@@ -4720,7 +4754,7 @@ var $;
4720
4754
  $.$mol_mem_key
4721
4755
  ], $mol_plot_map_heat.prototype, "level_points", null);
4722
4756
  __decorate([
4723
- $.$mol_mem
4757
+ $.$mol_mem_key
4724
4758
  ], $mol_plot_map_heat.prototype, "level_opacity", null);
4725
4759
  __decorate([
4726
4760
  $.$mol_mem