fix controller height compute
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
"svelte": "^2.16.0"
|
"svelte": "^2.16.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"rrweb": "^0.7.25"
|
"rrweb": "^0.7.28"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "rollup -c",
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
<div class="rr-player" ref:player style="{playerStyle}">
|
<div class="rr-player" ref:player style="{playerStyle}">
|
||||||
<div class="rr-player__frame" ref:frame { style }></div>
|
<div class="rr-player__frame" ref:frame { style }></div>
|
||||||
{#if replayer}
|
{#if replayer}
|
||||||
<Controller { replayer } {showController} {autoPlay} {skipInactive} on:fullscreen="fullscreen()" />
|
<Controller
|
||||||
|
{
|
||||||
|
replayer
|
||||||
|
}
|
||||||
|
{showController}
|
||||||
|
{autoPlay}
|
||||||
|
{skipInactive}
|
||||||
|
on:fullscreen="fullscreen()"
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -40,10 +48,10 @@
|
|||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
playerStyle({ width, height }) {
|
playerStyle({ width, height, showController }) {
|
||||||
return inlineCss({
|
return inlineCss({
|
||||||
width: `${width}px`,
|
width: `${width}px`,
|
||||||
height: `${height + controllerHeight}px`,
|
height: `${height + showController ? controllerHeight : 0}px`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -77,8 +85,8 @@
|
|||||||
skipInactive: true,
|
skipInactive: true,
|
||||||
showWarning: true,
|
showWarning: true,
|
||||||
});
|
});
|
||||||
replayer.on('resize', (dimension) =>
|
replayer.on('resize', dimension =>
|
||||||
this.updateScale(replayer.wrapper, dimension)
|
this.updateScale(replayer.wrapper, dimension),
|
||||||
);
|
);
|
||||||
this.set({
|
this.set({
|
||||||
replayer,
|
replayer,
|
||||||
@@ -118,8 +126,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -146,4 +152,4 @@
|
|||||||
:global(.replayer-wrapper > iframe) {
|
:global(.replayer-wrapper > iframe) {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user