Fix transparency and toggle on resize
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2019-09-12 09:57:45 +02:00
parent 7c0af90769
commit e728d7b042
2 changed files with 11 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ export class SidePanelComponent implements OnChanges {
setTop() {
this.mobile = this.checkMobile();
this.resizeTop = this.mobile?50:0;
this.top = (this.collapsed? (this.mobile? 100:0): this.resizeTop) + "%";
this.top = (this.visible?this.resizeTop: (this.mobile? 100:0)) + "%";
}
ngAfterViewInit() {
@@ -69,7 +69,7 @@ export class SidePanelComponent implements OnChanges {
clientY=(event as DragEvent).clientY;
}
this.resizeTop = Math.min(98, Math.max(0, clientY / (this.parentHeight / 100)));
this.top = (this.collapsed? (this.mobile? 100:0): this.resizeTop) + "%";
this.top = (this.visible? this.resizeTop:(this.mobile? 100:0)) + "%";
}
ngOnChanges(changes: SimpleChanges) {