@netless/slide 1.4.55 → 1.4.56
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/lib/RenderSlideVisibility.d.ts +20 -0
- package/lib/RenderSlideVisibility.js +16 -0
- package/lib/Slide.d.ts +1 -0
- package/lib/Slide.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare type VisibilityStyle = {
|
|
2
|
+
visibility: string;
|
|
3
|
+
};
|
|
4
|
+
declare type DisplayStyle = {
|
|
5
|
+
display: string;
|
|
6
|
+
};
|
|
7
|
+
declare type RenderSlidePlayer = {
|
|
8
|
+
view?: {
|
|
9
|
+
style: VisibilityStyle;
|
|
10
|
+
} | null;
|
|
11
|
+
};
|
|
12
|
+
declare type RenderSlideElement = {
|
|
13
|
+
style: VisibilityStyle & DisplayStyle;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Reveal a completed live render and remove its fallback image.
|
|
17
|
+
* Frozen and release states own visibility while their player transition is active.
|
|
18
|
+
*/
|
|
19
|
+
export declare function updateRenderSlideVisibility(isReleasing: boolean, player: RenderSlidePlayer | undefined, frame: RenderSlideElement, cacheImage: RenderSlideElement): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reveal a completed live render and remove its fallback image.
|
|
3
|
+
* Frozen and release states own visibility while their player transition is active.
|
|
4
|
+
*/
|
|
5
|
+
export function updateRenderSlideVisibility(isReleasing, player, frame, cacheImage) {
|
|
6
|
+
if (isReleasing || !(player === null || player === void 0 ? void 0 : player.view)) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (player.view.style.visibility === "hidden") {
|
|
10
|
+
player.view.style.visibility = "visible";
|
|
11
|
+
}
|
|
12
|
+
if (frame.style.visibility === "hidden") {
|
|
13
|
+
frame.style.visibility = "visible";
|
|
14
|
+
}
|
|
15
|
+
cacheImage.style.display = "none";
|
|
16
|
+
}
|
package/lib/Slide.d.ts
CHANGED