@node-projects/web-component-designer 0.0.179 → 0.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
import * as monaco from 'monaco-editor';
|
|
3
2
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
4
3
|
export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
5
4
|
dispose() {
|
|
@@ -9,6 +8,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
9
8
|
elementsToPackages;
|
|
10
9
|
code;
|
|
11
10
|
onTextChanged = new TypedEvent();
|
|
11
|
+
//@ts-ignore
|
|
12
12
|
_monacoEditor;
|
|
13
13
|
_editor;
|
|
14
14
|
static style = css `
|
|
@@ -136,6 +136,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
136
136
|
let point1 = model.getPositionAt(position.start);
|
|
137
137
|
let point2 = model.getPositionAt(position.start + position.length);
|
|
138
138
|
this._monacoEditor.setSelection({ startLineNumber: point1.lineNumber, startColumn: point1.column, endLineNumber: point2.lineNumber, endColumn: point2.column });
|
|
139
|
+
//@ts-ignore
|
|
139
140
|
setTimeout(() => this._monacoEditor.revealRangeInCenter(new monaco.Range(point1.lineNumber, point1.column, point2.lineNumber, point2.column), 1));
|
|
140
141
|
}
|
|
141
142
|
}
|