MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / onResize

Method onResize

apps/rxjs.dev/src/app/app.component.ts:326–337  ·  view source on GitHub ↗
(width: number)

Source from the content-addressed store, hash-verified

324
325 @HostListener('window:resize', ['$event.target.innerWidth'])
326 onResize(width: number) {
327 this.isSideBySide = width >= this.sideBySideWidth;
328 this.showFloatingToc.next(width > this.showFloatingTocWidth);
329
330 if (this.isSideBySide && !this.isSideNavDoc) {
331 // If this is a non-sidenav doc and the screen is wide enough so that we can display menu
332 // items in the top-bar, ensure the sidenav is closed.
333 // (This condition can only be met when the resize event changes the value of `isSideBySide`
334 // from `false` to `true` while on a non-sidenav doc.)
335 this.sidenav.toggle(false);
336 }
337 }
338
339 @HostListener('click', ['$event.target', '$event.button', '$event.ctrlKey', '$event.metaKey', '$event.altKey'])
340 onClick(eventTarget: HTMLElement, button: number, ctrlKey: boolean, metaKey: boolean, altKey: boolean): boolean {

Callers 1

ngOnInitMethod · 0.95

Calls 2

toggleMethod · 0.80
nextMethod · 0.65

Tested by

no test coverage detected