mirror of https://github.com/buster-so/buster.git
scrollbar for monaco updates
This commit is contained in:
parent
4ed586c4ae
commit
285f14c24d
|
@ -83,6 +83,11 @@ export const AppCodeEditor = forwardRef<AppCodeEditorHandle, AppCodeEditorProps>
|
||||||
minimap: {
|
minimap: {
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
|
scrollbar: {
|
||||||
|
verticalScrollbarSize: 5,
|
||||||
|
alwaysConsumeMouseWheel: false,
|
||||||
|
useShadows: false
|
||||||
|
},
|
||||||
padding: {
|
padding: {
|
||||||
top: 10
|
top: 10
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,6 +67,15 @@ export const AppDiffCodeEditor = forwardRef<AppDiffCodeEditorHandle, AppDiffCode
|
||||||
renderOverviewRuler: false,
|
renderOverviewRuler: false,
|
||||||
wordWrap: 'on',
|
wordWrap: 'on',
|
||||||
scrollBeyondLastLine: true,
|
scrollBeyondLastLine: true,
|
||||||
|
scrollbar: {
|
||||||
|
verticalScrollbarSize: 5,
|
||||||
|
alwaysConsumeMouseWheel: false,
|
||||||
|
useShadows: false
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
top: 10
|
||||||
|
},
|
||||||
|
glyphMargin: false,
|
||||||
minimap: {
|
minimap: {
|
||||||
enabled: false
|
enabled: false
|
||||||
},
|
},
|
||||||
|
@ -103,11 +112,18 @@ export const AppDiffCodeEditor = forwardRef<AppDiffCodeEditorHandle, AppDiffCode
|
||||||
const originalEditor = editor.getOriginalEditor();
|
const originalEditor = editor.getOriginalEditor();
|
||||||
originalEditor.updateOptions({
|
originalEditor.updateOptions({
|
||||||
wordWrap: 'on',
|
wordWrap: 'on',
|
||||||
wrappingStrategy: 'advanced'
|
wrappingStrategy: 'advanced',
|
||||||
|
padding: { top: 16 },
|
||||||
|
glyphMargin: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get the modified editor and add change listener
|
// Get the modified editor and add change listener
|
||||||
const modifiedEditor = editor.getModifiedEditor();
|
const modifiedEditor = editor.getModifiedEditor();
|
||||||
|
modifiedEditor.updateOptions({
|
||||||
|
padding: { top: 16 },
|
||||||
|
glyphMargin: true
|
||||||
|
});
|
||||||
|
|
||||||
if (!readOnly && !disabled) {
|
if (!readOnly && !disabled) {
|
||||||
modifiedEditor.onDidChangeModelContent(() => {
|
modifiedEditor.onDidChangeModelContent(() => {
|
||||||
onChange?.(modifiedEditor.getValue() || '');
|
onChange?.(modifiedEditor.getValue() || '');
|
||||||
|
|
|
@ -130,11 +130,6 @@ export const TermIndividualContent: React.FC<{
|
||||||
onChange={(v) => {
|
onChange={(v) => {
|
||||||
onSetTermSQL.run(v);
|
onSetTermSQL.run(v);
|
||||||
}}
|
}}
|
||||||
monacoEditorOptions={{
|
|
||||||
scrollbar: {
|
|
||||||
alwaysConsumeMouseWheel: false
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ItemContainer>
|
</ItemContainer>
|
||||||
|
|
Loading…
Reference in New Issue