Added zoom and fixed imports
This commit is contained in:
19
src/zoomImage.js
Normal file
19
src/zoomImage.js
Normal file
@ -0,0 +1,19 @@
|
||||
window.fullScreen = false;
|
||||
|
||||
function zoom(id) {
|
||||
if (window.fullScreen == false) {
|
||||
var img = document.getElementById(id);
|
||||
img.style.width = "95%";
|
||||
img.style.height = "auto";
|
||||
img.style.position = "fixed";
|
||||
img.style.top = "0px";
|
||||
window.fullScreen = true;
|
||||
}
|
||||
else {
|
||||
var img = document.getElementById(id);
|
||||
img.style.width = "70%";
|
||||
img.style.height = "auto";
|
||||
img.style.position = "relative";
|
||||
window.fullScreen = false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user