more refactor
This commit is contained in:
parent
9933f4f9ff
commit
d612678682
3 changed files with 36 additions and 52 deletions
|
|
@ -9,14 +9,13 @@ import { Page } from '../../../../model/page';
|
|||
styleUrls: ['./settings.component.scss']
|
||||
})
|
||||
export class SettingsComponent implements OnInit {
|
||||
page: Page;
|
||||
constructor(public modalService: ModalService, public dataService: DataService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.modalService.active.input.subscribe(p => (this.page = p));
|
||||
}
|
||||
|
||||
page: Page;
|
||||
|
||||
async deletePage() {
|
||||
try {
|
||||
await this.modalService.showRemovePage(this.page.name);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export class TowerComponent implements OnInit {
|
|||
this.blocks = value.coloredBlocks
|
||||
.filter(b => b.isDone)
|
||||
.map(b => {
|
||||
let classedBlock = b as StyledBlock;
|
||||
const classedBlock = b as StyledBlock;
|
||||
classedBlock.shouldDraw = true;
|
||||
classedBlock.style = { transform: 'translateY(0)', opacity: '1' };
|
||||
classedBlock.cssClass = '';
|
||||
|
|
@ -52,7 +52,7 @@ export class TowerComponent implements OnInit {
|
|||
console.log(this.tower, this.tower.latestVersion, value);
|
||||
}
|
||||
if (this.tower && this.tower.latestVersion === value) {
|
||||
let difference = this.tower.blocks.map((b, index) => {
|
||||
const difference = this.tower.blocks.map((b, index) => {
|
||||
return b === value.blocks[index];
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export class DoubleSliderComponent {
|
|||
}
|
||||
|
||||
private emitValue() {
|
||||
const range = {
|
||||
this.range.emit({
|
||||
from:
|
||||
this.oneValue < this.otherValue
|
||||
? this.values[this.indexFromValue(this.oneValue)]
|
||||
|
|
@ -102,7 +102,6 @@ export class DoubleSliderComponent {
|
|||
this.oneValue < this.otherValue
|
||||
? this.values[this.indexFromValue(this.otherValue)]
|
||||
: this.values[this.indexFromValue(this.oneValue)]
|
||||
};
|
||||
this.range.emit(range);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue