Skip to content

Commit

Permalink
feat(platform): allow zooming script editor content with the mouse wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Mar 2, 2024
1 parent 3e09090 commit 187fdfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/workspace/components/script_editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import TSWorker from 'url:monaco-editor/esm/vs/language/typescript/ts.worker.js'

loader.config({ monaco });

// See https://github.com/microsoft/monaco-editor/blob/main/docs/integrate-esm.md#using-parcel
self.MonacoEnvironment = {
getWorkerUrl: (_, label) => (label === 'typescript' || label === 'javascript' ? TSWorker : EditorWorker),
};
Expand Down Expand Up @@ -99,6 +100,7 @@ export function ScriptEditor({ onChange, defaultValue }: Props) {
<Editor
height="15vh"
defaultLanguage="javascript"
options={{ mouseWheelZoom: true }}
defaultValue={defaultValue}
onChange={(value) => onChange(value)}
theme={'euiTheme'}
Expand Down

0 comments on commit 187fdfd

Please sign in to comment.