linkImages: false passed, but images linked and controls shown
plagasul opened this issue · 1 comments
Hello, gorgeous plugin and website!
I am instatiating chocolat as such (old website with jquery)
$(document).ready(function() {
...
// Chocolat.js
Chocolat(document.querySelectorAll('.chocolat-image'),{
imageSize: 'contain',
linkImages: false,
loop: false,
closeOnBackgroundClick: true,
fullScreen: false,
allowZoom: false,
});
...
})
The structure looks like this:
<figure>
<div> <!-- don't mind this extra div -->
<a class="chocolat-image" href="..."><img src="..."></a>
<a class="chocolat-image" href="..."><img src="..."></a>
<a class="chocolat-image" href="..."><img src="..."></a>
</div>
<figcaption>...</figcaption>
</figure>
And although linkImages is set to false, images are linked. I get the bottom bar with the pagination etc and I can navigate all images in the page with left and right keys.
I use keys because adittionally I am getting a lot of errors regarding the images that chocolat needs for left, right, close etc, that are not found by the script:
Btw I load .js and .css files at head and body bottom. I suppose I could copy the files from the repo to the site manually, but I don't need them, I don't want any left, right, pagination etc etc.
What's going on?
thank you
Hello,
Indeed linkImages: false
doesn't disable keyboard navigation.
I've deployed a fix here :
https://github.com/nicolas-t/Chocolat/releases/tag/1.0.1
If you don't want the images I suggest you override the styles in your own css, for example :
body .chocolat-wrapper .chocolat-right {
background: none;
}