-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON w/ simple image, duplicate data on reload #40
Comments
I have made a small change to src/pivotviewer.js that should sort out this problem. Can you give it try. |
Unfortunately that did not resolve the issue, still seeing duplicate values. When the debug flag is enabled, here is the output for simpleimages.html:
Something is causing InitPivotViewer to be run multiple times after loading the json/cxml. Could it be something having to do with the pub/sub library? Subscription to "PivotViewer/Models/Collection/Loaded" triggers a call to InitTileCollection() maybe? I'm only able to replicate this issue using SimpleImageController |
After more exploration, it appears that the duplicate data only appears if I have the F12 developers console open in Chrome and I reload a page with an html5pivotviewer attached to it. |
I am experiencing this same issue. Is there a known solution? |
My team abandoned the project that was going to utilize the pivotviewer, so I'm afraid I have no updates for you. |
Hi Carson2006, can you let me know a few more details - are you also using the JSON loader and which browsers are you seeing the issue in? |
This issue appears to occur when This can happen in the Setup function of PivotViewer.Views.SimpleImageController if the last image to load is not the last image in the _images array. To resolve this I changed the for loop to a while loop. New code excerpt:
Let me know if you would like a pull request. This seems to be a very nice pivot viewer clone, generally. |
@mhykes That looks to have solved my issue, thanks! |
I'm trying to use the JSON loader with a SimpleImageController in an asp.net site, but when I reload the page, I'm ending up with multiple instances of the pivotviewer on the same #pivotviewer div.
Example image: http://i.imgur.com/VzItlbx.png
I'm starting the viewer like so:
Is there a proper way to destroy any existing instances of the html5pivotviewer and its data on a DOM element or page before attaching a new?
The text was updated successfully, but these errors were encountered: