range rework
This commit is contained in:
parent
08262981fd
commit
aaba8d47ac
@ -10,8 +10,6 @@ import { reference } from '../../../utils/functions';
|
|||||||
import { debounce } from '../../../utils/debounce';
|
import { debounce } from '../../../utils/debounce';
|
||||||
|
|
||||||
declare var ace;
|
declare var ace;
|
||||||
ace.config.set('basePath', '/assets/ace-editor/');
|
|
||||||
const Range = ace.acequire('ace/range').Range;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'redaction-dictionary-overview-screen',
|
selector: 'redaction-dictionary-overview-screen',
|
||||||
@ -46,6 +44,7 @@ export class DictionaryOverviewScreenComponent {
|
|||||||
private readonly _activatedRoute: ActivatedRoute,
|
private readonly _activatedRoute: ActivatedRoute,
|
||||||
private readonly _appStateService: AppStateService
|
private readonly _appStateService: AppStateService
|
||||||
) {
|
) {
|
||||||
|
ace.config.set('basePath', '/assets/ace-editor/');
|
||||||
this._activatedRoute.params.subscribe((params) => {
|
this._activatedRoute.params.subscribe((params) => {
|
||||||
this.dictionary = this._appStateService.dictionaryData[params.type];
|
this.dictionary = this._appStateService.dictionaryData[params.type];
|
||||||
if (!this.dictionary) {
|
if (!this.dictionary) {
|
||||||
@ -96,6 +95,7 @@ export class DictionaryOverviewScreenComponent {
|
|||||||
});
|
});
|
||||||
this.activeSearchMarkers = [];
|
this.activeSearchMarkers = [];
|
||||||
|
|
||||||
|
const Range = ace.acequire('ace/range').Range;
|
||||||
for (const position of this.searchPositions) {
|
for (const position of this.searchPositions) {
|
||||||
this.activeSearchMarkers.push(
|
this.activeSearchMarkers.push(
|
||||||
this.editorComponent
|
this.editorComponent
|
||||||
@ -133,6 +133,7 @@ export class DictionaryOverviewScreenComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Range = ace.acequire('ace/range').Range;
|
||||||
for (const i of this.changedLines) {
|
for (const i of this.changedLines) {
|
||||||
this.activeEditMarkers.push(this.editorComponent.getEditor().getSession().addMarker(new Range(i, 0, i, 1), 'changed-row-marker', 'fullLine'));
|
this.activeEditMarkers.push(this.editorComponent.getEditor().getSession().addMarker(new Range(i, 0, i, 1), 'changed-row-marker', 'fullLine'));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user