@micromag/core 0.3.616 → 0.3.618
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/contexts.js +11 -4
- package/es/index.js +1 -2
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -1193,11 +1193,18 @@ var TrackingProvider = function TrackingProvider(_ref) {
|
|
|
1193
1193
|
disabled = _ref.disabled,
|
|
1194
1194
|
children = _ref.children;
|
|
1195
1195
|
var contextTracking = useTracking() || null;
|
|
1196
|
+
var refTracking = useRef(null);
|
|
1196
1197
|
var tracking = useMemo(function () {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1198
|
+
if (refTracking.current === null) {
|
|
1199
|
+
refTracking.current = new Tracking({
|
|
1200
|
+
variables: _objectSpread(_objectSpread({}, contextTracking !== null ? contextTracking.getVariables() : null), variables),
|
|
1201
|
+
disabled: disabled
|
|
1202
|
+
});
|
|
1203
|
+
} else {
|
|
1204
|
+
refTracking.current.setVariables(_objectSpread(_objectSpread({}, refTracking.current.getVariables()), variables));
|
|
1205
|
+
refTracking.current.setDisabled(disabled);
|
|
1206
|
+
}
|
|
1207
|
+
return refTracking.current;
|
|
1201
1208
|
}, [contextTracking, variables, disabled]);
|
|
1202
1209
|
return /*#__PURE__*/React.createElement(TrackingContainer, {
|
|
1203
1210
|
tracking: tracking
|
package/es/index.js
CHANGED
|
@@ -2204,7 +2204,6 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
|
|
|
2204
2204
|
screenId: screenId,
|
|
2205
2205
|
screenType: screenType,
|
|
2206
2206
|
screenIndex: screenIndex,
|
|
2207
|
-
screensCount: screensCount,
|
|
2208
2207
|
screenTitle: screenTitle,
|
|
2209
2208
|
screenDescrition: screenDescrition,
|
|
2210
2209
|
screenProgress: screensCount !== null && screenIndex !== null ? (screenIndex + 1) / screensCount : null,
|
|
@@ -2271,7 +2270,7 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
|
|
|
2271
2270
|
data.mediaCurrentTime = Math.round(currentTime);
|
|
2272
2271
|
}
|
|
2273
2272
|
if (currentTime !== null && duration !== null && duration > 0) {
|
|
2274
|
-
data.mediaProgress =
|
|
2273
|
+
data.mediaProgress = currentTime / duration;
|
|
2275
2274
|
}
|
|
2276
2275
|
this.push(data);
|
|
2277
2276
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.618",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"access": "public",
|
|
145
145
|
"registry": "https://registry.npmjs.org/"
|
|
146
146
|
},
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "326f53fe66a702f890b60e4abff3541f508567b8"
|
|
148
148
|
}
|