Skip to content
Snippets Groups Projects
Commit f468be77 authored by rhenck's avatar rhenck
Browse files

[editor] Remove page switch event

Use selected page index for similar functionality.
parent ab74bf06
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ export class PageCanvasComponent implements OnInit, OnDestroy {
this.elementUpdatedSubscription = this.unitService.elementUpdated.subscribe(() => {
this.updateSectionElementStyles();
});
this.pageSwitchSubscription = this.unitService.pageSwitch.subscribe(
this.pageSwitchSubscription = this.unitService.selectedPageIndex.subscribe(
() => {
this.clearSelection();
}
......
......@@ -21,7 +21,6 @@ export class UnitService {
private _selectedPageSectionIndex: BehaviorSubject<number>;
private _selectedElements: BehaviorSubject<UnitUIElement[]>;
pageSwitch = new Subject();
elementUpdated = new Subject();
constructor(private messageService: MessageService, private idService: IdService) {
......@@ -152,11 +151,6 @@ export class UnitService {
this._pages[this._selectedPageIndex.value].next(this._unit.value.pages[this._selectedPageIndex.value]);
}
switchPage(selectedIndex: number): void {
this.clearSelectedElements();
this.pageSwitch.next(selectedIndex);
}
clearSelectedElements(): void {
this._selectedElements.next([]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment