@micromag/core 0.4.43 → 0.4.44
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 +3 -4
- package/lib/contexts.js +3 -4
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -1027,16 +1027,16 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1027
1027
|
useEffect(function () {
|
|
1028
1028
|
return function () {
|
|
1029
1029
|
if (active) {
|
|
1030
|
-
console.log('clear media');
|
|
1030
|
+
console.log('clear register media');
|
|
1031
1031
|
setMedia(null);
|
|
1032
1032
|
setIsBackground(false);
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
|
-
}, [active, setMedia, setIsBackground]);
|
|
1035
|
+
}, [active, setMedia, setIsBackground, updateKey]);
|
|
1036
1036
|
|
|
1037
1037
|
// Register media with context when active and no media is registered
|
|
1038
1038
|
useEffect(function () {
|
|
1039
|
-
console.log('try to register media', active, mediaRef.current, media);
|
|
1039
|
+
console.log('try to register media', active, mediaRef.current, media, updateKey);
|
|
1040
1040
|
if (!active || mediaRef.current === null || media !== null) {
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
@@ -1044,7 +1044,6 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1044
1044
|
setIsBackground(background);
|
|
1045
1045
|
setMedia(mediaRef.current);
|
|
1046
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1047
|
-
console.log('usePlaybackMediaRef', mediaRef.current, media);
|
|
1048
1047
|
return {
|
|
1049
1048
|
ref: mediaRef,
|
|
1050
1049
|
isCurrent: mediaRef.current === media
|
package/lib/contexts.js
CHANGED
|
@@ -1027,16 +1027,16 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1027
1027
|
React.useEffect(function () {
|
|
1028
1028
|
return function () {
|
|
1029
1029
|
if (active) {
|
|
1030
|
-
console.log('clear media');
|
|
1030
|
+
console.log('clear register media');
|
|
1031
1031
|
setMedia(null);
|
|
1032
1032
|
setIsBackground(false);
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
|
-
}, [active, setMedia, setIsBackground]);
|
|
1035
|
+
}, [active, setMedia, setIsBackground, updateKey]);
|
|
1036
1036
|
|
|
1037
1037
|
// Register media with context when active and no media is registered
|
|
1038
1038
|
React.useEffect(function () {
|
|
1039
|
-
console.log('try to register media', active, mediaRef.current, media);
|
|
1039
|
+
console.log('try to register media', active, mediaRef.current, media, updateKey);
|
|
1040
1040
|
if (!active || mediaRef.current === null || media !== null) {
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
@@ -1044,7 +1044,6 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1044
1044
|
setIsBackground(background);
|
|
1045
1045
|
setMedia(mediaRef.current);
|
|
1046
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1047
|
-
console.log('usePlaybackMediaRef', mediaRef.current, media);
|
|
1048
1047
|
return {
|
|
1049
1048
|
ref: mediaRef,
|
|
1050
1049
|
isCurrent: mediaRef.current === media
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.44",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -161,6 +161,6 @@
|
|
|
161
161
|
"access": "public",
|
|
162
162
|
"registry": "https://registry.npmjs.org/"
|
|
163
163
|
},
|
|
164
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "53a3c8f40a4fd514b47463d697cfbe3d5a8b86cc",
|
|
165
165
|
"types": "es/index.d.ts"
|
|
166
166
|
}
|