@node-projects/web-component-designer 0.0.177 → 0.0.178
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,4 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
2
3
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
3
4
|
export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
4
5
|
dispose() {
|
|
@@ -135,7 +136,7 @@ export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
135
136
|
let point1 = model.getPositionAt(position.start);
|
|
136
137
|
let point2 = model.getPositionAt(position.start + position.length);
|
|
137
138
|
this._monacoEditor.setSelection({ startLineNumber: point1.lineNumber, startColumn: point1.column, endLineNumber: point2.lineNumber, endColumn: point2.column });
|
|
138
|
-
setTimeout(() => this._monacoEditor.
|
|
139
|
+
setTimeout(() => this._monacoEditor.revealRangeInCenter(new monaco.Range(point1.lineNumber, point1.column, point2.lineNumber, point2.column), 1));
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
customElements.define('node-projects-code-view-monaco', CodeViewMonaco);
|