MCPcopy Create free account
hub / github.com/devforth/painterro / show

Method show

js/main.js:1243–1266  ·  view source on GitHub ↗
(openImage, originalMime)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 5

loadImageMethod · 0.95
clearMethod · 0.95
attachEventHandlersMethod · 0.95
getScrollbarWidthFunction · 0.90
trimFunction · 0.90

Tested by

no test coverage detected