feat: overflow hidden
This commit is contained in:
@@ -316,7 +316,7 @@ export const BrowserWindow = () => {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div onClick={handleClick} style={{ width: '900px'}} id="browser-window">
|
<div onClick={handleClick} style={{ width: '1150px'}} id="browser-window">
|
||||||
{
|
{
|
||||||
getText === true || getList === true ? (
|
getText === true || getList === true ? (
|
||||||
<GenericModal
|
<GenericModal
|
||||||
@@ -356,20 +356,20 @@ export const BrowserWindow = () => {
|
|||||||
</GenericModal>
|
</GenericModal>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
<div style={{ height: '500px', overflowY: 'auto' }}> {/* Make this section scrollable */}
|
<div style={{ height: '400px', overflow: 'hidden' }}>
|
||||||
{((getText === true || getList === true) && !showAttributeModal && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ?
|
{((getText === true || getList === true) && !showAttributeModal && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ?
|
||||||
<Highlighter
|
<Highlighter
|
||||||
unmodifiedRect={highlighterData?.rect}
|
unmodifiedRect={highlighterData?.rect}
|
||||||
displayedSelector={highlighterData?.selector}
|
displayedSelector={highlighterData?.selector}
|
||||||
width={900}
|
width={1150}
|
||||||
height={500}
|
height={400}
|
||||||
canvasRect={canvasRef.current.getBoundingClientRect()}
|
canvasRect={canvasRef.current.getBoundingClientRect()}
|
||||||
/>
|
/>
|
||||||
: null}
|
: null}
|
||||||
<Canvas
|
<Canvas
|
||||||
onCreateRef={setCanvasReference}
|
onCreateRef={setCanvasReference}
|
||||||
width={900}
|
width={1150}
|
||||||
height={500}
|
height={400}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -385,7 +385,7 @@ const drawImage = (image: string, canvas: HTMLCanvasElement): void => {
|
|||||||
img.src = image;
|
img.src = image;
|
||||||
img.onload = () => {
|
img.onload = () => {
|
||||||
URL.revokeObjectURL(img.src);
|
URL.revokeObjectURL(img.src);
|
||||||
ctx?.drawImage(img, 0, 0, 900, 500);
|
ctx?.drawImage(img, 0, 0, 1150, 400);
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user