Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 965 Bytes

File metadata and controls

26 lines (24 loc) · 965 Bytes

imageExaminer

Let you zoom, move in an image that you want to see up close with a simple implementation

import {ImageExaminer} from './imageExaminer.js';

const img1 = document.getElementById("img1");
const img2 = document.getElementById("img2");
const img3 = document.getElementById("img3");
const img4 = document.getElementById("img4");

const imageExaminer = new ImageExaminer([img1, img2, img3, img4], 1, 1);




Constructor :
ImageExaminer(images : array, CENTERIMAGE : bool, DISPLAYHELPER : bool)

images - array of the images to display
 those images should have top, left, width, height styles initialized in the HMTL or CSS file

CENTERIMAGE - if the image is bigger than the viewport, whether or not to center it on first load

DISPLAYHELPER - whether to display or not an helper screen to help user to use the examiner


more settings can be tweaked in the js file.