MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / setFrameDim

Method setFrameDim

src/content-scripts/verifyFrame.js:114–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 }
113
114 setFrameDim() {
115 let width;
116 let height;
117 this.eFrame.style.bottom = 0;
118 if (this.vDialog) {
119 ({height} = this.pgpRange.getBoundingClientRect());
120 ({width} = this.pgpElement.parentElement.getBoundingClientRect());
121 if (!width || !height) {
122 return;
123 }
124 // less 1px border and 2 pixel box-shadow
125 width -= 3;
126 this.vDialog.style.width = `${width}px`;
127 this.vDialog.style.height = `${height}px`;
128 } else {
129 ({height} = this.pgpSigRange.getBoundingClientRect());
130 ({width} = this.pgpRange.getBoundingClientRect());
131 }
132 if (!width || !height) {
133 return;
134 }
135 this.eFrame.style.width = `${width}px`;
136 this.eFrame.style.height = `${height}px`;
137 }
138}

Callers 3

inlineDialogMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected