MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / getElementSize

Method getElementSize

data/src/emulator.js:4116–4128  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

4114 this.handleSettingsResize();
4115 }
4116 getElementSize(element) {
4117 let elem = element.cloneNode(true);
4118 elem.style.position = "absolute";
4119 elem.style.opacity = 0;
4120 elem.removeAttribute("hidden");
4121 element.parentNode.appendChild(elem);
4122 const res = elem.getBoundingClientRect();
4123 elem.remove();
4124 return {
4125 "width": res.width,
4126 "height": res.height
4127 };
4128 }
4129 saveSettings() {
4130 if (!window.localStorage || this.config.disableLocalStorage || !this.settingsLoaded) return;
4131 if (!this.started && !this.failedToStart) return;

Callers 5

goToHomeMethod · 0.95
setupDisksMenuMethod · 0.95
createSettingParentMethod · 0.95
addToMenuMethod · 0.95
setupSettingsMenuMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected