Fix splitter (#1307)

Use window for splitter resizing

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-06-12 16:20:11 +02:00 committed by GitHub
parent 6285af458a
commit 4580bc9658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 131 additions and 59 deletions

View file

@ -11,6 +11,17 @@
font-family: 'Source Sans Pro', "Twemoji", sans-serif;
word-break: break-word;
.svg-container {
overflow-x: auto;
width: 100%;
display: inline-block;
text-align: center;
svg {
max-width: 100%;
}
}
.alert > p, .alert > ul {
margin-bottom: 0;
}

View file

@ -28,5 +28,5 @@ export const AbcFrame: React.FC<AbcFrameProps> = ({ code }) => {
})
}, [code])
return <div ref={container} className={'abcjs-score bg-white text-black text-center overflow-x-auto'} />
return <div ref={container} className={'abcjs-score bg-white text-black svg-container'} />
}

View file

@ -63,7 +63,7 @@ export const GraphvizFrame: React.FC<GraphvizFrameProps> = ({ code }) => {
<ShowIf condition={!!error}>
<Alert variant={'warning'}>{error}</Alert>
</ShowIf>
<div className={'text-center overflow-x-auto'} data-cy={'graphviz'} ref={container} />
<div className={'svg-container'} data-cy={'graphviz'} ref={container} />
</Fragment>
)
}

View file

@ -64,7 +64,7 @@ export const MarkmapFrame: React.FC<MarkmapFrameProps> = ({ code }) => {
return (
<div data-cy={'markmap'}>
<div className={'text-center'} ref={diagramContainer} />
<div className={'svg-container'} ref={diagramContainer} />
<div className={'text-right button-inside'}>
<LockButton
locked={disablePanAndZoom}