MCPcopy Create free account
hub / github.com/apache/cloudstack / _handleResize

Method _handleResize

systemvm/agent/noVNC/core/rfb.js:881–897  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

879
880 // Handle browser window resizes
881 _handleResize() {
882 // Don't change anything if the client size is already as expected
883 if (this._clientHasExpectedSize()) {
884 return;
885 }
886 // If the window resized then our screen element might have
887 // as well. Update the viewport dimensions.
888 window.requestAnimationFrame(() => {
889 this._updateClip();
890 this._updateScale();
891 this._saveExpectedClientSize();
892 });
893
894 // Request changing the resolution of the remote display to
895 // the size of the local browser viewport.
896 this._requestRemoteResize();
897 }
898
899 // Update state of clipping in Display object, and make sure the
900 // configured viewport matches the current screen size

Callers

nothing calls this directly

Calls 5

_updateClipMethod · 0.95
_updateScaleMethod · 0.95
_requestRemoteResizeMethod · 0.95

Tested by

no test coverage detected