function drawImage(src, divid) {
   DIV[divid] = document.getElementById(divid);
   DIV[divid].style.display = 'inline-block';
   DIV[divid].style.position = 'relative';
   IS_ZOOM[divid] = false;
   const image = document.createElement("img");
   image.id = divid + 'Image';
   image.src = src;
   image.style.maxWidth = '100%';
   image.style.maxHeight = '100%';
   document.getElementById(divid).appendChild(image);
   createZoom(divid);
   createLens(divid);

   window.addEventListener('load', function() {
      initialize(divid);
      createControls(divid);
   });
}
/**
 * Main function of the script
 * This take two parameters, one is the SRC of the picture, it can be an directory or a Base64 code or whatever the <img> can take
 *
 * @param src -- normal <img> src
 * @param divid -- The ID where to dray the picture
 */
Main function of the script
This take two parameters, one is the SRC of the picture, it can be an directory or a Base64 code or whatever the  can take

@param src -- normal  src
@param divid -- The ID where to dray the picture
Main function of the script This take two parameters one is the SRC of the picture it can be an directory or a Base64 code or whatever the can take @param src -- normal src @param divid -- The ID where to dray the picture
function drawImage(src, divid) {
   DIV[divid] = document.getElementById(divid);
   DIV[divid].style.display = 'inline-block';
   DIV[divid].style.position = 'relative';
   IS_ZOOM[divid] = false;
   const image = document.createElement("img");
   image.id = divid + 'Image';
   image.src = src;
   image.style.maxWidth = '100%';
   image.style.maxHeight = '100%';
   document.getElementById(divid).appendChild(image);
   createZoom(divid);
   createLens(divid);
   window.addEventListener('load', function() {
      initialize(divid);
      createControls(divid);
   });
}
function drawImage ( src , divid ) { DIV [ divid ] = document . getElementById ( divid ) ; DIV [ divid ] . style . display = 'inline-block' ; DIV [ divid ] . style . position = 'relative' ; IS_ZOOM [ divid ] = false ; const image = document . createElement ( "img" ) ; image . id = divid + 'Image' ; image . src = src ; image . style . maxWidth = '100%' ; image . style . maxHeight = '100%' ; document . getElementById ( divid ) . appendChild ( image ) ; createZoom ( divid ) ; createLens ( divid ) ; window . addEventListener ( 'load' , function ( ) { initialize ( divid ) ; createControls ( divid ) ; } ) ; }
Main function of the script
 This take two parameters, one is the SRC of the picture, it can be an directory or a Base64 code or whatever the <img> can take
Main function of the script This take two parameters one is the SRC of the picture it can be an directory or a Base64 code or whatever the <img > can take