| 268 | } |
| 269 | |
| 270 | finishLoading() { |
| 271 | if (this.main.toolByName.open.buttonId) { |
| 272 | const btn = this.main.getElemByIdSafe(this.main.toolByName.open.buttonId); |
| 273 | if (btn) { |
| 274 | btn.removeAttribute('disabled'); |
| 275 | } |
| 276 | const icon = this.main.doc.querySelector(`#${this.main.toolByName.open.buttonId} > i`); |
| 277 | if (icon) { |
| 278 | icon.className = 'ptro-icon ptro-icon-open'; |
| 279 | } |
| 280 | } |
| 281 | if (this.main.params.onImageLoaded) { |
| 282 | this.main.params.onImageLoaded(); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | static get(main) { |
| 287 | if (main.inserter) { |