Fix cartel generation issue

Was preventing the ability to click on paintings
This commit is contained in:
Théo Marchal 2021-03-03 19:32:59 +01:00
parent dae17821ad
commit ab5710e69e

View File

@ -16,9 +16,12 @@ function fancyboxInit(data, explorer)
caption: function(instance, item) caption: function(instance, item)
{ {
var idx = item.opts.fancyboxIndex - 1; // painting number var idx = 0; // search the index of the painting of filtered data
if (item.opts.fancyboxIndex >= 1000) for (i = 0; i < data.length; i++)
idx = item.opts.fancyboxIndex - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit {
if (data[i].number == item.opts.fancyboxIndex)
idx = i;
}
function generateCartel() function generateCartel()
{ {