FIX: Add unit to width and height CSS properties.

This commit is contained in:
Bianca Nenciu 2019-06-05 19:50:53 +03:00
parent c0e8950fdb
commit 35d0fd038e
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ function show(image) {
copyImg.style.position = "absolute"; copyImg.style.position = "absolute";
copyImg.style.top = `${image.offsetTop}px`; copyImg.style.top = `${image.offsetTop}px`;
copyImg.style.left = `${image.offsetLeft}px`; copyImg.style.left = `${image.offsetLeft}px`;
copyImg.style.width = imageData.width; copyImg.style.width = `${imageData.width}px`;
copyImg.style.height = imageData.height; copyImg.style.height = `${imageData.height}px`;
copyImg.className = imageData.className; copyImg.className = imageData.className;
image.parentNode.insertBefore(copyImg, image); image.parentNode.insertBefore(copyImg, image);