@longline/aqua-ui 1.0.158 → 1.0.160

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.
@@ -52,6 +52,9 @@ var PositionsManager = function (_a) {
52
52
  // Positions are restored from storage, if any were saved.
53
53
  var _d = React.useState(loadPositionsFromStorage()), positions = _d[0], setPositions = _d[1];
54
54
  var handleRegisterCoordinate = function (ev) {
55
+ // Ctrl key must be held down.
56
+ if (!ev.originalEvent.ctrlKey)
57
+ return;
55
58
  // Add click coordinates to positions list.
56
59
  setPositions(function (positions) {
57
60
  // Allow no more than 3 saved positions.
@@ -65,10 +68,10 @@ var PositionsManager = function (_a) {
65
68
  return newPositions;
66
69
  });
67
70
  };
68
- // Add a context menu (right-click) handler to the map, and removes
71
+ // Add a CTRL+click handler to the map, and removes
69
72
  // it on unmount.
70
73
  React.useEffect(function () {
71
- map.current.on('contextmenu', handleRegisterCoordinate);
74
+ map.current.on('click', handleRegisterCoordinate);
72
75
  return function () { map.current.off('contextmenu', handleRegisterCoordinate); };
73
76
  }, []);
74
77
  var handleMovePosition = function (idx, x, y) {
@@ -64,6 +64,9 @@ var ClusterMarkerBase = function (props) {
64
64
  var value = 0;
65
65
  // Calculate total value of ringfields:
66
66
  var totalValue = props.ringValues.reduce(function (acc, f) { return f + acc; }, 0);
67
+ // Prevent div0:
68
+ if (totalValue == 0)
69
+ return null;
67
70
  var rings = [];
68
71
  props.ringValues.forEach(function (ringValue, idx) {
69
72
  var relativeValue = ringValue / totalValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.158",
3
+ "version": "1.0.160",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",
@@ -3,6 +3,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { createGlobalStyle } from 'styled-components';
6
- var StyleBase = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n body {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: auto;\n color: ", ";\n }\n\n b, strong {\n font-weight: 700;\n }\n\n i, em {\n font-style: italic;\n }\n\n small, sub, sup { font-size: .83em; }\n sub { vertical-align: sub; }\n sup { vertical-align: super; }\n"], ["\n\n body {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: auto;\n color: ", ";\n }\n\n b, strong {\n font-weight: 700;\n }\n\n i, em {\n font-style: italic;\n }\n\n small, sub, sup { font-size: .83em; }\n sub { vertical-align: sub; }\n sup { vertical-align: super; }\n"])), function (p) { return p.theme.colors.font; });
6
+ var StyleBase = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n body {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n color: ", ";\n }\n\n b, strong {\n font-weight: 700;\n }\n\n i, em {\n font-style: italic;\n }\n\n small, sub, sup { font-size: .83em; }\n sub { vertical-align: sub; }\n sup { vertical-align: super; }\n"], ["\n\n body {\n font-family: Roboto;\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n color: ", ";\n }\n\n b, strong {\n font-weight: 700;\n }\n\n i, em {\n font-style: italic;\n }\n\n small, sub, sup { font-size: .83em; }\n sub { vertical-align: sub; }\n sup { vertical-align: super; }\n"])), function (p) { return p.theme.colors.font; });
7
7
  export { StyleBase };
8
8
  var templateObject_1;