@micromag/screen-map 0.2.405 → 0.2.409

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/es/index.js CHANGED
@@ -40,6 +40,7 @@ var propTypes = {
40
40
  withMarkerImages: PropTypes.bool,
41
41
  background: PropTypes$1.backgroundElement,
42
42
  current: PropTypes.bool,
43
+ active: PropTypes.bool,
43
44
  transitions: PropTypes$1.transitions,
44
45
  onEnableInteraction: PropTypes.func,
45
46
  onDisableInteraction: PropTypes.func,
@@ -57,6 +58,7 @@ var defaultProps = {
57
58
  withMarkerImages: false,
58
59
  background: null,
59
60
  current: true,
61
+ active: true,
60
62
  transitions: null,
61
63
  onEnableInteraction: null,
62
64
  onDisableInteraction: null,
@@ -77,6 +79,7 @@ var MapScreen = function MapScreen(_ref) {
77
79
  withMarkerImages = _ref.withMarkerImages,
78
80
  background = _ref.background,
79
81
  current = _ref.current,
82
+ active = _ref.active,
80
83
  transitions = _ref.transitions,
81
84
  onEnableInteraction = _ref.onEnableInteraction,
82
85
  onDisableInteraction = _ref.onDisableInteraction,
@@ -126,6 +129,7 @@ var MapScreen = function MapScreen(_ref) {
126
129
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
127
130
  var scrollingDisabled = !isEdit && transitionDisabled || !current;
128
131
  var backgroundPlaying = current && (isView || isEdit);
132
+ var backgroundShouldLoad = current || active || !isView;
129
133
 
130
134
  var _useState5 = useState(isStatic || isCapture),
131
135
  _useState6 = _slicedToArray(_useState5, 2),
@@ -470,7 +474,8 @@ var MapScreen = function MapScreen(_ref) {
470
474
  },
471
475
  width: width,
472
476
  height: height,
473
- playing: backgroundPlaying
477
+ playing: backgroundPlaying,
478
+ shouldLoad: backgroundShouldLoad
474
479
  }) : null, /*#__PURE__*/React.createElement(Container, {
475
480
  width: width,
476
481
  height: height
package/lib/index.js CHANGED
@@ -62,6 +62,7 @@ var propTypes = {
62
62
  withMarkerImages: PropTypes__default["default"].bool,
63
63
  background: core.PropTypes.backgroundElement,
64
64
  current: PropTypes__default["default"].bool,
65
+ active: PropTypes__default["default"].bool,
65
66
  transitions: core.PropTypes.transitions,
66
67
  onEnableInteraction: PropTypes__default["default"].func,
67
68
  onDisableInteraction: PropTypes__default["default"].func,
@@ -79,6 +80,7 @@ var defaultProps = {
79
80
  withMarkerImages: false,
80
81
  background: null,
81
82
  current: true,
83
+ active: true,
82
84
  transitions: null,
83
85
  onEnableInteraction: null,
84
86
  onDisableInteraction: null,
@@ -99,6 +101,7 @@ var MapScreen = function MapScreen(_ref) {
99
101
  withMarkerImages = _ref.withMarkerImages,
100
102
  background = _ref.background,
101
103
  current = _ref.current,
104
+ active = _ref.active,
102
105
  transitions = _ref.transitions,
103
106
  onEnableInteraction = _ref.onEnableInteraction,
104
107
  onDisableInteraction = _ref.onDisableInteraction,
@@ -148,6 +151,7 @@ var MapScreen = function MapScreen(_ref) {
148
151
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
149
152
  var scrollingDisabled = !isEdit && transitionDisabled || !current;
150
153
  var backgroundPlaying = current && (isView || isEdit);
154
+ var backgroundShouldLoad = current || active || !isView;
151
155
 
152
156
  var _useState5 = React.useState(isStatic || isCapture),
153
157
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
@@ -492,7 +496,8 @@ var MapScreen = function MapScreen(_ref) {
492
496
  },
493
497
  width: width,
494
498
  height: height,
495
- playing: backgroundPlaying
499
+ playing: backgroundPlaying,
500
+ shouldLoad: backgroundShouldLoad
496
501
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
497
502
  width: width,
498
503
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-map",
3
- "version": "0.2.405",
3
+ "version": "0.2.409",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,17 +49,17 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.2.405",
53
- "@micromag/element-background": "^0.2.405",
54
- "@micromag/element-button": "^0.2.405",
55
- "@micromag/element-call-to-action": "^0.2.405",
56
- "@micromag/element-container": "^0.2.405",
57
- "@micromag/element-heading": "^0.2.405",
58
- "@micromag/element-image": "^0.2.405",
59
- "@micromag/element-map": "^0.2.405",
60
- "@micromag/element-scroll": "^0.2.405",
61
- "@micromag/element-text": "^0.2.405",
62
- "@micromag/transforms": "^0.2.405",
52
+ "@micromag/core": "^0.2.409",
53
+ "@micromag/element-background": "^0.2.409",
54
+ "@micromag/element-button": "^0.2.409",
55
+ "@micromag/element-call-to-action": "^0.2.409",
56
+ "@micromag/element-container": "^0.2.409",
57
+ "@micromag/element-heading": "^0.2.409",
58
+ "@micromag/element-image": "^0.2.409",
59
+ "@micromag/element-map": "^0.2.409",
60
+ "@micromag/element-scroll": "^0.2.409",
61
+ "@micromag/element-text": "^0.2.409",
62
+ "@micromag/transforms": "^0.2.409",
63
63
  "classnames": "^2.2.6",
64
64
  "lodash": "^4.17.21",
65
65
  "prop-types": "^15.7.2",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "e3d172d92d78222d5307cc1513fee7eef9f28402"
72
+ "gitHead": "4c16c3bb63644d1bd5b7d50086098337317ee3f6"
73
73
  }