const img = document.querySelector('#previewImage');
let scale = 1;

document.addEventListener('wheel', (event) => {
  if (event.ctrlKey) {
    event.preventDefault();
    const scaleAmount = 0.1;
    if (event.deltaY < 0) {
      scale += scaleAmount;
    } else {
      scale -= scaleAmount;
      if (scale < scaleAmount) {
        scale = scaleAmount; 
      }
    }
    img.style.transform = `scale(${scale})`;
  }
}, { passive: false });
