|
|
|
@ -135,7 +135,7 @@ export class EditorComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const bounds = this.planElemFilterBounds();
|
|
|
|
|
let index = event.item.data;
|
|
|
|
|
let index = event.currentIndex;
|
|
|
|
|
if (bounds) {
|
|
|
|
|
index += bounds[0];
|
|
|
|
|
}
|
|
|
|
@ -318,6 +318,9 @@ export class EditorComponent implements OnInit {
|
|
|
|
|
if (file) {
|
|
|
|
|
// We disallow multiple but interface still says it can be multiple, thus the cast.
|
|
|
|
|
this.planService.loadPlanFromPath(file as string, false).subscribe(plan => {
|
|
|
|
|
while (this.original.length > 0) {
|
|
|
|
|
this.original.pop();
|
|
|
|
|
}
|
|
|
|
|
plan.plan.forEach(item => this.original.push(item));
|
|
|
|
|
this.filterPlanElements();
|
|
|
|
|
});
|
|
|
|
@ -327,6 +330,9 @@ export class EditorComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
loadBasePlan() {
|
|
|
|
|
this.planService.getBasePlan().subscribe(plan => {
|
|
|
|
|
while (this.original.length > 0) {
|
|
|
|
|
this.original.pop();
|
|
|
|
|
}
|
|
|
|
|
plan.plan.forEach(item => this.original.push(item));
|
|
|
|
|
this.filterPlanElements();
|
|
|
|
|
})
|
|
|
|
|