|
|
@ -146,9 +146,7 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A |
|
|
|
const event = new Event(this.resizeEvent); |
|
|
|
const event = new Event(this.resizeEvent); |
|
|
|
window.dispatchEvent(event); |
|
|
|
window.dispatchEvent(event); |
|
|
|
|
|
|
|
|
|
|
|
if (this.resizer.classList.contains('-error')) { |
|
|
|
this.manageErrorClass(false); |
|
|
|
this.resizer.classList.remove('-error'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resizeMove(deltas:ResizeDelta) { |
|
|
|
resizeMove(deltas:ResizeDelta) { |
|
|
@ -164,15 +162,11 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A |
|
|
|
newValue = this.elementMinWidth; |
|
|
|
newValue = this.elementMinWidth; |
|
|
|
|
|
|
|
|
|
|
|
// Show the resizer red when it reaches its limit (min-width)
|
|
|
|
// Show the resizer red when it reaches its limit (min-width)
|
|
|
|
if (!this.resizer.classList.contains('-error')) { |
|
|
|
this.manageErrorClass(true); |
|
|
|
this.resizer.classList.add('-error'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
newValue = this.elementWidth; |
|
|
|
newValue = this.elementWidth; |
|
|
|
|
|
|
|
|
|
|
|
if (this.resizer.classList.contains('-error')) { |
|
|
|
this.manageErrorClass(false); |
|
|
|
this.resizer.classList.remove('-error'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Store item in local storage
|
|
|
|
// Store item in local storage
|
|
|
@ -218,4 +212,14 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A |
|
|
|
let fullScreenLeftView = jQuery('.work-packages-full-view--split-left')[0]; |
|
|
|
let fullScreenLeftView = jQuery('.work-packages-full-view--split-left')[0]; |
|
|
|
this.toggleColumns(fullScreenLeftView); |
|
|
|
this.toggleColumns(fullScreenLeftView); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private manageErrorClass(shouldBePresent:boolean) { |
|
|
|
|
|
|
|
if (shouldBePresent && !this.resizer.classList.contains('-error')) { |
|
|
|
|
|
|
|
this.resizer.classList.add('-error'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!shouldBePresent && this.resizer.classList.contains('-error')) { |
|
|
|
|
|
|
|
this.resizer.classList.remove('-error'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|