mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Expose EditorZoom
in the monaco API
This commit is contained in:
parent
bbe8e872dc
commit
107a4809df
|
@ -85,6 +85,7 @@ export interface ICommandHandler {
|
|||
#include(vs/editor/browser/config/editorConfiguration): IEditorConstructionOptions
|
||||
#includeAll(vs/editor/browser/editorBrowser;editorCommon.=>):
|
||||
#include(vs/editor/common/config/fontInfo): FontInfo, BareFontInfo
|
||||
#include(vs/editor/common/config/editorZoom): EditorZoom, IEditorZoom
|
||||
|
||||
//compatibility:
|
||||
export type IReadOnlyModel = ITextModel;
|
||||
|
|
|
@ -36,6 +36,7 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
|||
import { PLAINTEXT_LANGUAGE_ID } from 'vs/editor/common/languages/modesRegistry';
|
||||
import { LineRangeMapping, RangeMapping } from 'vs/editor/common/diff/linesDiffComputer';
|
||||
import { LineRange } from 'vs/editor/common/core/lineRange';
|
||||
import { EditorZoom } from 'vs/editor/common/config/editorZoom';
|
||||
|
||||
/**
|
||||
* Create a new editor under `domElement`.
|
||||
|
@ -508,6 +509,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor {
|
|||
LineRange: <any>LineRange,
|
||||
LineRangeMapping: <any>LineRangeMapping,
|
||||
RangeMapping: <any>RangeMapping,
|
||||
EditorZoom: <any>EditorZoom,
|
||||
|
||||
// vars
|
||||
EditorType: EditorType,
|
||||
|
|
8
src/vs/monaco.d.ts
vendored
8
src/vs/monaco.d.ts
vendored
|
@ -5834,6 +5834,14 @@ declare namespace monaco.editor {
|
|||
readonly letterSpacing: number;
|
||||
}
|
||||
|
||||
export const EditorZoom: IEditorZoom;
|
||||
|
||||
export interface IEditorZoom {
|
||||
onDidChangeZoomLevel: IEvent<number>;
|
||||
getZoomLevel(): number;
|
||||
setZoomLevel(zoomLevel: number): void;
|
||||
}
|
||||
|
||||
//compatibility:
|
||||
export type IReadOnlyModel = ITextModel;
|
||||
export type IModel = ITextModel;
|
||||
|
|
Loading…
Reference in a new issue