diff --git a/app/assets/stylesheets/layout/_work_packages_full_view.sass b/app/assets/stylesheets/layout/_work_packages_full_view.sass index 2fc09b8b91..094144fe35 100644 --- a/app/assets/stylesheets/layout/_work_packages_full_view.sass +++ b/app/assets/stylesheets/layout/_work_packages_full_view.sass @@ -144,9 +144,11 @@ body.controller-work_packages.full-create .work-packages-full-view--resizer .work-packages--resizer + height: 100vh width: 18px - left: 0 + left: -2px &::before + position: sticky left: -2px .nosidebar diff --git a/frontend/src/app/components/resizer/wp-resizer.component.ts b/frontend/src/app/components/resizer/wp-resizer.component.ts index 2612bd2be7..6a02d8202f 100644 --- a/frontend/src/app/components/resizer/wp-resizer.component.ts +++ b/frontend/src/app/components/resizer/wp-resizer.component.ts @@ -28,7 +28,6 @@ import {ChangeDetectorRef, Component, ElementRef, HostListener, Injector, Input, OnDestroy, OnInit} from '@angular/core'; import {distinctUntilChanged} from 'rxjs/operators'; -import {Subscription} from 'rxjs/Subscription'; import {untilComponentDestroyed} from 'ng2-rx-componentdestroyed'; import {MainMenuToggleService} from "core-components/resizer/main-menu-toggle.service"; @@ -50,8 +49,6 @@ export class WpResizerDirective implements OnInit, OnDestroy { public moving:boolean = false; - private subscription:Subscription; - constructor(readonly toggleService:MainMenuToggleService, private elementRef:ElementRef) { } @@ -88,17 +85,16 @@ export class WpResizerDirective implements OnInit, OnDestroy { untilComponentDestroyed(this) ) .subscribe( changeData => { - jQuery('.can-have-columns').toggleClass('-columns-2', jQuery('.work-packages-full-view--split-left')[0].offsetWidth > 750); + jQuery('.can-have-columns').toggleClass('-columns-2', jQuery('.work-packages-full-view--split-left').width() > 750); }); jQuery(window).resize(function() { - jQuery('.can-have-columns').toggleClass('-columns-2', jQuery('.work-packages-full-view--split-left')[0].offsetWidth > 750); + jQuery('.can-have-columns').toggleClass('-columns-2', jQuery('.work-packages-full-view--split-left').width() > 750); }); } ngOnDestroy() { // Reset the style when killing this directive, otherwise the style remains this.resizingElement.style.flexBasis = null; - this.subscription.unsubscribe(); } @HostListener('mousedown', ['$event']) @@ -182,8 +178,7 @@ export class WpResizerDirective implements OnInit, OnDestroy { private applyColumnLayout(element:HTMLElement, newWidth:number) { // Apply two column layout in fullscreen view of a workpackage if (element === jQuery('.work-packages-full-view--split-right')[0]) { - let widthLeftCol = jQuery('.work-packages-full-view--split-left')[0].offsetWidth; - jQuery('.can-have-columns').toggleClass('-columns-2', widthLeftCol > 750); + jQuery('.can-have-columns').toggleClass('-columns-2', jQuery('.work-packages-full-view--split-left').width() > 750); } // Apply two column layout when details view of wp is open else {