@micromag/core 0.4.41 → 0.4.42
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 +1 -19
- package/lib/contexts.js +1 -19
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -1032,22 +1032,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1032
1032
|
setIsBackground(false);
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
|
-
}, [active, setMedia, setIsBackground
|
|
1036
|
-
|
|
1037
|
-
// useEffect(() => {
|
|
1038
|
-
// if (!active) {
|
|
1039
|
-
// console.log('unset media');
|
|
1040
|
-
// setMedia(null);
|
|
1041
|
-
// setIsBackground(false);
|
|
1042
|
-
// }
|
|
1043
|
-
// return () => {
|
|
1044
|
-
// if (active) {
|
|
1045
|
-
// console.log('clear media');
|
|
1046
|
-
// setMedia(null);
|
|
1047
|
-
// setIsBackground(false);
|
|
1048
|
-
// }
|
|
1049
|
-
// };
|
|
1050
|
-
// }, [active, setMedia, setIsBackground]);
|
|
1035
|
+
}, [active, setMedia, setIsBackground]);
|
|
1051
1036
|
|
|
1052
1037
|
// Register media with context when active and no media is registered
|
|
1053
1038
|
useEffect(function () {
|
|
@@ -1059,9 +1044,6 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1059
1044
|
setIsBackground(background);
|
|
1060
1045
|
setMedia(mediaRef.current);
|
|
1061
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1062
|
-
|
|
1063
|
-
// console.log('playback', mediaRef.current, media);
|
|
1064
|
-
|
|
1065
1047
|
return {
|
|
1066
1048
|
ref: mediaRef,
|
|
1067
1049
|
isCurrent: mediaRef.current === media
|
package/lib/contexts.js
CHANGED
|
@@ -1032,22 +1032,7 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1032
1032
|
setIsBackground(false);
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
|
-
}, [active, setMedia, setIsBackground
|
|
1036
|
-
|
|
1037
|
-
// useEffect(() => {
|
|
1038
|
-
// if (!active) {
|
|
1039
|
-
// console.log('unset media');
|
|
1040
|
-
// setMedia(null);
|
|
1041
|
-
// setIsBackground(false);
|
|
1042
|
-
// }
|
|
1043
|
-
// return () => {
|
|
1044
|
-
// if (active) {
|
|
1045
|
-
// console.log('clear media');
|
|
1046
|
-
// setMedia(null);
|
|
1047
|
-
// setIsBackground(false);
|
|
1048
|
-
// }
|
|
1049
|
-
// };
|
|
1050
|
-
// }, [active, setMedia, setIsBackground]);
|
|
1035
|
+
}, [active, setMedia, setIsBackground]);
|
|
1051
1036
|
|
|
1052
1037
|
// Register media with context when active and no media is registered
|
|
1053
1038
|
React.useEffect(function () {
|
|
@@ -1059,9 +1044,6 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
|
|
|
1059
1044
|
setIsBackground(background);
|
|
1060
1045
|
setMedia(mediaRef.current);
|
|
1061
1046
|
}, [active, background, media, updateKey, setMedia, setIsBackground]);
|
|
1062
|
-
|
|
1063
|
-
// console.log('playback', mediaRef.current, media);
|
|
1064
|
-
|
|
1065
1047
|
return {
|
|
1066
1048
|
ref: mediaRef,
|
|
1067
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.42",
|
|
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": "6fd96aeb9ef1857c731917d8b7cde23d31b39574",
|
|
165
165
|
"types": "es/index.d.ts"
|
|
166
166
|
}
|