@@ -94,8 +94,6 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
9494 if ( cropButton ) {
9595 cropButton . style . width = `${ imageDimensions . width } px` ;
9696 cropButton . style . height = `${ imageDimensions . height } px` ;
97- cropButton . style . left = `${ imageDimensions . x } px` ;
98- cropButton . style . top = `${ imageDimensions . y } px` ;
9997 }
10098
10199 setCroppingRect ( { startX : 0 , startY : 0 , endX : imageDimensions . width , endY : imageDimensions . height } ) ;
@@ -212,6 +210,8 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
212210 ctx . clearRect ( 0 , 0 , imageBuffer . width , imageBuffer . height ) ;
213211 imageBuffer . width = cutoutCanvas . width ;
214212 imageBuffer . height = cutoutCanvas . height ;
213+ imageBuffer . style . width = `${ cutoutCanvas . width } px` ;
214+ imageBuffer . style . height = `${ cutoutCanvas . height } px` ;
215215 ctx . drawImage ( cutoutCanvas , 0 , 0 ) ;
216216 resizeCropper ( ) ;
217217 }
@@ -229,6 +229,8 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
229229 }
230230 imageBuffer . width = imageSource . videoWidth ;
231231 imageBuffer . height = imageSource . videoHeight ;
232+ imageBuffer . style . width = '100%' ;
233+ imageBuffer . style . height = '100%' ;
232234 context . drawImage ( imageSource , 0 , 0 ) ;
233235 } ,
234236 [ imageBuffer ] ,
@@ -249,7 +251,7 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
249251 < div class = "editor" >
250252 < style dangerouslySetInnerHTML = { styles } />
251253 < div class = "editor__canvas-container" ref = { canvasContainerRef } >
252- < div class = "editor__crop-container" style = { { position : 'absolute' } } ref = { cropContainerRef } >
254+ < div class = "editor__crop-container" style = { { position : 'absolute' , zIndex : 1 } } ref = { cropContainerRef } >
253255 < canvas style = { { position : 'absolute' } } ref = { croppingRef } > </ canvas >
254256 < CropCorner
255257 left = { croppingRect . startX - CROP_BUTTON_BORDER }
0 commit comments