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';
|
||||
|
||||
declare var ace;
|
||||
ace.config.set('basePath', '/assets/ace-editor/');
|
||||
const Range = ace.acequire('ace/range').Range;
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dictionary-overview-screen',
|
||||
@ -46,6 +44,7 @@ export class DictionaryOverviewScreenComponent {
|
||||
private readonly _activatedRoute: ActivatedRoute,
|
||||
private readonly _appStateService: AppStateService
|
||||
) {
|
||||
ace.config.set('basePath', '/assets/ace-editor/');
|
||||
this._activatedRoute.params.subscribe((params) => {
|
||||
this.dictionary = this._appStateService.dictionaryData[params.type];
|
||||
if (!this.dictionary) {
|
||||
@ -96,6 +95,7 @@ export class DictionaryOverviewScreenComponent {
|
||||
});
|
||||
this.activeSearchMarkers = [];
|
||||
|
||||
const Range = ace.acequire('ace/range').Range;
|
||||
for (const position of this.searchPositions) {
|
||||
this.activeSearchMarkers.push(
|
||||
this.editorComponent
|
||||
@ -133,6 +133,7 @@ export class DictionaryOverviewScreenComponent {
|
||||
}
|
||||
}
|
||||
|
||||
const Range = ace.acequire('ace/range').Range;
|
||||
for (const i of this.changedLines) {
|
||||
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