Add @EventListener('resize')

This will allow components to listen for throttled window resize events
The resize event will only be fired for a component if the width or the height of the component changed
327144
function (eventRegistry, namespace, eventName) {
    var isRunning = false;
    var frameIsRequested = false;
    var resizeDoneTimer;
    var componentInformation;
    var fireResizeEvent = eventName === WINDOW_RESIZED_EVENT ? fireWindowResizeEvent : fireComponentResizeEvent;
    /**
     * This handler is called if a new resize event happens.
     * A resize event is new if no resize occurred for 250ms
     */
    function startResizeWatching(event) {
        var components = getComponentsInEventRegistry(eventRegistry, namespace);
        isRunning = true;
        // The resize listener is fired very often
        // for performance optimisations we search and store
        // all components during the initial start event
        componentInformation = components.map(function (component) {
            var size = component.__resizeSize || {
                width: 0,
                height: 0
            };
            var gondelComponentHandlers = eventRegistry[component._componentName];
            return {
                component: component,
                node: component._ctx,
                selectors: Object.keys(gondelComponentHandlers).map(function (selector) {
                    return gondelComponentHandlers[selector].map(function (handlerOption) { return component[handlerOption.handlerName]; });
                }),
                width: size.width,
                height: size.height
            };
        });
        fireResizeEvent(event);
    }
    /**
     * Clean up after no resize event happened for 250ms
     */
    function stopResizeWatching() {
        // If there is still a throttled resize handler
        // wait until it is done
        if (frameIsRequested) {
            requestAnimationFrame(stopResizeWatching);
            return;
        }
        // Memory cleanup
        isRunning = false;
        componentInformation = undefined;
    }
    /**
     * Check which modules changed in size, are still running and call their event handler
     */
    function fireComponentResizeEvent(event) {
        frameIsRequested = false;
        if (!componentInformation) {
            return;
        }
        var newSizes = componentInformation.map(function (_a) {
            var node = _a.node;
            return ({
                width: node.clientWidth,
                height: node.clientHeight
            });
        });
        var handlerResults = [];
        componentInformation.forEach(function (componentInformation, i) {
            var newSize = newSizes[i];
            // Skip if the size did not change
            if (newSize.width === componentInformation.width &&
                newSize.height === componentInformation.height) {
                return;
            }
            // Skip if the component is not running anymore
            if (componentInformation.component._stopped) {
                return;
            }
            componentInformation.component.__resizeSize = newSize;
            componentInformation.width = newSize.width;
            componentInformation.height = newSize.height;
            componentInformation.selectors.forEach(function (selector) {
                return selector.forEach(function (handler) {
                    return handlerResults.push(handler.call(componentInformation.component, event, newSize));
                });
            });
        });
        handlerResults.forEach(function (handlerResult) {
            if (typeof handlerResult === "function") {
                handlerResult();
            }
        });
    }
    /**
     * Check if the components are still running and call their event handler
     */
    function fireWindowResizeEvent(event) {
        frameIsRequested = false;
        if (!componentInformation) {
            return;
        }
        var handlerResults = [];
        componentInformation.forEach(function (componentInformation, i) {
            // Skip if the component is not running anymore
            if (componentInformation.component._stopped) {
                return;
            }
            componentInformation.selectors.forEach(function (selector) {
                return selector.forEach(function (handler) {
                    return handlerResults.push(handler.call(componentInformation.component, event));
                });
            });
        });
        handlerResults.forEach(function (handlerResult) {
            if (typeof handlerResult === "function") {
                handlerResult();
            }
        });
    }
    window.addEventListener("resize", function (event) {
        if (!isRunning) {
            startResizeWatching(event);
        }
        else if (!frameIsRequested) {
            frameIsRequested = true;
            window.requestAnimationFrame(fireResizeEvent.bind(null, event));
        }
        clearTimeout(resizeDoneTimer);
        resizeDoneTimer = setTimeout(stopResizeWatching, 250);
    });
}
873842
function (id, width)
        {
            ModalDialog.id    = id;
            ModalDialog.width = width;
    
            ModalDialog.ShowBackground();
            ModalDialog.ShowDialog();
    
            // Install the event handlers
            window.onresize = ModalDialog.Resize;
    
            
            // Call them initially
            ModalDialog.Resize();
            
            if (typeof(ModalDialog.onmodaldialog) == 'function') {
                ModalDialog.onmodaldialog();
            }
            ModalDialog.FireCustomEvent('onmodaldialog');
        }
802622
public void onResize(int width, int height) {
		// Center the line in the shell
		int lineWidth = lineElement.getOffsetWidth();
		lineLeftOffset = (width / 2) - (lineWidth / 2);
		DOM.setStyleAttribute(lineElement, "left", lineLeftOffset + "px");

		// Draw the other components
		drawLabels();
		drawTicks();
		drawKnob();
	}
893720
function (el, binding, vnode) {
    let resizeListenerId = el.dataset.responsives
    delete self.resizeListeners[resizeListenerId]
  }
94388
def onresize(self, emitter, width, height):
        
        super(MyApp, self).onresize(emitter, width, height)
398033
function () {
        if (__autoresizes == null) {
            __autoresizes = [];
            ariaUtilsAriaWindow.attachWindow();
            eventUtils.addListener(Aria.$window, "resize", {
                fn : __onResize
            });
            // PTR 08127833 - it updates the viewport sizes the first time a DOM element is registered as autoresizable
            __applyNewSize();
        }
    }
349565
def on_resize(self, event):
        
        if self._aspect is None:
            return
        w, h = self._canvas.size
        aspect = self._aspect / (w / h)
        self.scale = (self.scale[0], self.scale[0] / aspect)
        self.shader_map()
122364
private String getResizeJavaScript() {				
		StringBuilder sb = new StringBuilder();
		sb.append("$(window).bind(\'resizeEnd\',function(){");
		sb.append(getNextChartJavascriptCall());
		sb.append("});");
		return sb.toString();
	}
719358
function resize () {
    if (!running) {
      running = true

      if (window.requestAnimationFrame) {
        window.requestAnimationFrame(runCallbacks)
      } else {
        setTimeout(runCallbacks, 66)
      }
    }
  }
70033
function blockResizeStart() {
			var lastListeningElement;

			// We'll attach only one listener at a time, instead of adding it to every img, input, hr etc.
			// Listener will be attached upon selectionChange, we'll also check if there was any element that
			// got listener before (lastListeningElement) - if so we need to remove previous listener.
			editor.editable().attachListener( editor, 'selectionChange', function() {
				var selectedElement = editor.getSelection().getSelectedElement();

				if ( selectedElement ) {
					if ( lastListeningElement ) {
						lastListeningElement.detachEvent( 'onresizestart', resizeStartListener );
						lastListeningElement = null;
					}

					// IE requires using attachEvent, because it does not work using W3C compilant addEventListener,
					// tested with IE10.
					selectedElement.$.attachEvent( 'onresizestart', resizeStartListener );
					lastListeningElement = selectedElement.$;
				}
			} );
		}
255717
function(event, args) {
		
		WireIt.CanvasContainer.superclass.onResize.call(this, event, args);
		
      var size = args[0];
		
		// resize the canvas
		// TODO: do not hardcode those sizes !!
		this.canvasWidth = (size[0]-14);
		this.canvasHeight = (size[1]-( this.ddHandle ? 44 : 14) );
		this.canvasEl.SetCanvasRegion(0,0, this.canvasWidth, this.canvasHeight );
		
		this.drawCanvas();
   }
978267
def resizeEvent(self, event):
        
        super(XTabWidget, self).resizeEvent(event)
        self.adjustButtons()
519223
private String getResizeJavaScript() {				
		StringBuilder sb = new StringBuilder();
		sb.append("$(window).bind(\'resizeEnd\',function(){");
		sb.append(getIndicatorCall());
		sb.append("});");
		return sb.toString();
	}
90695
function onResize() {
	if ( this.stdout.columns && this.stdout.rows ) {
		this.width = this.stdout.columns ;
		this.height = this.stdout.rows ;
	}

	this.emit( 'resize' , this.width , this.height ) ;
}
307295
def on_size(self, event):
        ''''''
        state = self.state
        size = event.GetSize()
        state.width = size.width
        state.height = size.height
        self.redraw_map()
106601
def resizeEvent( self, event ):
        
        super(XLineEdit, self).resizeEvent(event)
        self.adjustButtons()
566107
def on_widget__configure_event(self, widget, event):
        '''
        
        '''
        if event.x < 0 and event.y < 0:
            # Widget has not been allocated a size yet, so do nothing.
            return
        self.resize(event.width, event.height)