diff --git a/src/app/app.component.html b/src/app/app.component.html index 0c2a11cb0a..88c51b2b3d 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,5 +1,4 @@ -

Yeahaha

45 && this.pos < 55) { newPos = 100; } this._updatePos(newPos); @@ -76,13 +76,11 @@ export class SplitComponent implements OnInit { this._renderer.removeClass(this.splitTopEl, ANIMATABLE_CLASS); this._renderer.removeClass(this.splitBottomEl, ANIMATABLE_CLASS); this._isDrag = true; - // console.log('onMouseDown', ev); + const bounds = this.containerEl.getBoundingClientRect(); const h = this.containerEl.offsetHeight; - // const handleHeight = this.buttonEl._elementRef.nativeElement.offsetHeight * 3 / 2; - const handleHeight = this.buttonEl._elementRef.nativeElement.offsetHeight * 2 / 2; - // console.log(handleHeight); + const headerHeight = bounds.top; - let percentage = (ev.clientY - handleHeight) / h * 100; + let percentage = (ev.clientY - headerHeight) / h * 100; if (percentage > 100) { percentage = 100; }