Hello, I recieve from the console log this:
Cannot read property 'x' of undefined -- From line 487
this is the function it refers to (p1.x = p2.x is the faulty line)
_equalizePoints = function(p1, p2) {
p1.x = p2.x;
p1.y = p2.y;
if(p2.id) {
p1.id = p2.id;
}
any Idea or suggestion?
I am currently running this inside a webView of an android App
Can you repeat the issue in browser?
Please provide a reduced test case (isolated example) that reproduces the problem.
You may create it based on CodePens in PhotoSwipe documentation: raw gallery, gallery with thumbnails, custom HTML content in slides. If you're not comfortable with CodePen, you may export code via Share -> Export .zip, and upload test case to your server.
I got same error when i tried to build PhotoSwipe in working photogallery website. js debugger from browser dev console said that p2 in _equalizePoints() is undefined. i looked up who calls this function, and it was finishWithoutAnimation(): (photoswipe.js:2555)
_equalizePoints(_panOffset, item.initialPosition );
js debugger confirmed that item has no initialPosition field.
BUT. when i tried to make isolated example, i was unable to reproduce that error... everything worked well.
ps. tonight i'll figure out if finishWithoutAnimation() invoking in my isolated example.
oh, i got it! i forgot to include photoswipe.css....
Most helpful comment
oh, i got it! i forgot to include photoswipe.css....