constructor(el, slide, onclose = null) {
        this.img = el;
        this.slide = slide;
        this.onclose = onclose;

        if (this.img.setZoomEvents) {
            return false;
        }

        this.active = false;
        this.zoomedIn = false;
        this.dragging = false;
        this.currentX = null;
        this.currentY = null;
        this.initialX = null;
        this.initialY = null;
        this.xOffset = 0;
        this.yOffset = 0;

        this.img.addEventListener('mousedown', (e) => this.dragStart(e), false);
        this.img.addEventListener('mouseup', (e) => this.dragEnd(e), false);
        this.img.addEventListener('mousemove', (e) => this.drag(e), false);

        this.img.addEventListener(
            'click',
            (e) => {
                if (this.slide.classList.contains('dragging-nav')) {
                    this.zoomOut();
                    return false;
                }

                if (!this.zoomedIn) {
                    return this.zoomIn();
                }
                if (this.zoomedIn && !this.dragging) {
                    this.zoomOut();
                }
            },
            false
        );

        this.img.setZoomEvents = true;
    }
ZoomImages
Allow imaes to zoom and drag
for desktops

@param {node} img node
@param {node} slide container
@param {function} function to trigger on close