Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Blurred image #403

Open
R0TIPRATA opened this issue Jul 9, 2022 · 0 comments
Open

Blurred image #403

R0TIPRATA opened this issue Jul 9, 2022 · 0 comments

Comments

@R0TIPRATA
Copy link

Hi, awesome work with your plugin :) I was able to upload my first image successfully as below.

image

However, when I put it in a popover for my gallery, the image became pixelated.

image

I'm not sure why this is the case? Here is my code:

In JS file:

const getImage = function (index) {
    fullURL = filePath[index][0];
    if(!panorama){
        container = document.querySelector('#main-360-viewer');
        viewer = new PANOLENS.Viewer( { container: container } );
     }
     panorama = new PANOLENS.ImagePanorama(fullURL);
     viewer.add( panorama );
     popup.style.transform = `translateY(0)`;
     popup.style.zIndex = "3";
      
     selectedIndex = index;
     nextIndexURL = setNextIndex(index);
     prevIndexURL = setPrevIndex(index);
}

//on clicking > btn in popover
const getNextIndexURL = function (e) {
  viewer.remove(panorama);
  panorama.dispose(fullURL);
  getImage(nextIndex);
};

CSS file:

#main-360-viewer {
  width: 600px;
  height: 300px;
  margin-bottom: 24px;
}

Any help would be greatly appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant