@@ -94,8 +94,6 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
94
94
if ( cropButton ) {
95
95
cropButton . style . width = `${ imageDimensions . width } px` ;
96
96
cropButton . style . height = `${ imageDimensions . height } px` ;
97
- cropButton . style . left = `${ imageDimensions . x } px` ;
98
- cropButton . style . top = `${ imageDimensions . y } px` ;
99
97
}
100
98
101
99
setCroppingRect ( { startX : 0 , startY : 0 , endX : imageDimensions . width , endY : imageDimensions . height } ) ;
@@ -212,6 +210,8 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
212
210
ctx . clearRect ( 0 , 0 , imageBuffer . width , imageBuffer . height ) ;
213
211
imageBuffer . width = cutoutCanvas . width ;
214
212
imageBuffer . height = cutoutCanvas . height ;
213
+ imageBuffer . style . width = `${ cutoutCanvas . width } px` ;
214
+ imageBuffer . style . height = `${ cutoutCanvas . height } px` ;
215
215
ctx . drawImage ( cutoutCanvas , 0 , 0 ) ;
216
216
resizeCropper ( ) ;
217
217
}
@@ -229,6 +229,8 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
229
229
}
230
230
imageBuffer . width = imageSource . videoWidth ;
231
231
imageBuffer . height = imageSource . videoHeight ;
232
+ imageBuffer . style . width = '100%' ;
233
+ imageBuffer . style . height = '100%' ;
232
234
context . drawImage ( imageSource , 0 , 0 ) ;
233
235
} ,
234
236
[ imageBuffer ] ,
@@ -249,7 +251,7 @@ export function makeScreenshotEditorComponent({ imageBuffer, dialog, options }:
249
251
< div class = "editor" >
250
252
< style dangerouslySetInnerHTML = { styles } />
251
253
< 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 } >
253
255
< canvas style = { { position : 'absolute' } } ref = { croppingRef } > </ canvas >
254
256
< CropCorner
255
257
left = { croppingRect . startX - CROP_BUTTON_BORDER }
0 commit comments