(openImage, originalMime)
| 1241 | } |
| 1242 | |
| 1243 | show(openImage, originalMime) { |
| 1244 | this.shown = true; |
| 1245 | this.scrollWidth = getScrollbarWidth(); |
| 1246 | if (this.isMobile) { |
| 1247 | this.origOverflowY = this.body.style['overflow-y']; |
| 1248 | if (this.params.fixMobilePageReloader) { |
| 1249 | this.body.style['overflow-y'] = 'hidden'; |
| 1250 | } |
| 1251 | } |
| 1252 | this.baseEl.removeAttribute('hidden'); |
| 1253 | if (this.holderEl) { |
| 1254 | this.holderEl.removeAttribute('hidden'); |
| 1255 | } |
| 1256 | if (typeof openImage === 'string') { |
| 1257 | this.loadedName = trim( |
| 1258 | (openImage.substring(openImage.lastIndexOf('/') + 1) || '').replace(/\..+$/, '')); |
| 1259 | |
| 1260 | this.loadImage(openImage, originalMime); |
| 1261 | } else if (openImage !== false) { |
| 1262 | this.clear(); |
| 1263 | } |
| 1264 | this.attachEventHandlers(); |
| 1265 | return this; |
| 1266 | } |
| 1267 | |
| 1268 | hide() { |
| 1269 | if (this.isMobile) { |
nothing calls this directly
no test coverage detected