| 102 | } |
| 103 | |
| 104 | setFrameDim() { |
| 105 | if (this.dDialog === null) { |
| 106 | super.setFrameDim(); |
| 107 | } else { |
| 108 | const {height} = this.pgpRange.getBoundingClientRect(); |
| 109 | let {width} = this.pgpElement.parentElement.getBoundingClientRect(); |
| 110 | if (!width || !height) { |
| 111 | return; |
| 112 | } |
| 113 | // less 1px border and 2 pixel box-shadow |
| 114 | width -= 3; |
| 115 | this.eFrame.style.width = `${width}px`; |
| 116 | // set absolute dims for performance reasons |
| 117 | this.dDialog.style.width = `${width}px`; |
| 118 | this.dDialog.style.height = `${height}px`; |
| 119 | } |
| 120 | } |
| 121 | } |