Newer
Older
import { PageChangeService } from 'common/services/page-change.service';
import { UnitService } from '../../services/unit-services/unit.service';
import { SelectionService } from '../../services/selection.service';
import { HistoryService } from 'editor/src/app/services/history.service';
import { PageService } from 'editor/src/app/services/unit-services/page.service';
selector: 'aspect-unit-view',
templateUrl: './unit-view.component.html',
constructor(public selectionService: SelectionService,
public unitService: UnitService,
public pageService: PageService,
public pageChangeService: PageChangeService,
public historyService: HistoryService) { }
selectPage(newIndex: number): void {
this.pageService.addPage();
}
/* This is a hack. The tab element gets bugged when changing the underlying array.
With this we can temporarily remove it from the DOM and then add it again, re-initializing it. */
refreshTabs(): void {
this.pagesLoaded = false;
setTimeout(() => {
this.pagesLoaded = true;
});