File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/replay-canvas/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,22 @@ const CANVAS_QUALITY = {
5555} ;
5656
5757const INTEGRATION_NAME = 'ReplayCanvas' ;
58+ const DEFAULT_MAX_CANVAS_SIZE = 1280 ;
5859
5960/** Exported only for type safe tests. */
6061export const _replayCanvasIntegration = ( ( options : Partial < ReplayCanvasOptions > = { } ) => {
62+ const [ maxCanvasWidth , maxCanvasHeight ] = options . maxCanvasSize || [ ] ;
6163 const _canvasOptions = {
6264 quality : options . quality || 'medium' ,
6365 enableManualSnapshot : options . enableManualSnapshot ,
64- maxCanvasSize : options . maxCanvasSize || [ 1280 , 1280 ] ,
66+ maxCanvasSize : [
67+ maxCanvasWidth ?
68+ Math . max ( maxCanvasWidth , DEFAULT_MAX_CANVAS_SIZE )
69+ : DEFAULT_MAX_CANVAS_SIZE ,
70+ maxCanvasHeight ?
71+ Math . max ( maxCanvasHeight , DEFAULT_MAX_CANVAS_SIZE )
72+ : DEFAULT_MAX_CANVAS_SIZE
73+ ] ,
6574 } ;
6675
6776 let canvasManagerResolve : ( value : CanvasManager ) => void ;
You can’t perform that action at this time.
0 commit comments