()
| 213 | |
| 214 | // Add images distribution to html |
| 215 | function addHtmlImages() |
| 216 | { |
| 217 | calculateImagesDataWithClip(); |
| 218 | calculateImagesDistribution(); |
| 219 | |
| 220 | let _imagesDistribution = applyMangaReading(imagesDistribution); |
| 221 | |
| 222 | let folderImages = []; |
| 223 | |
| 224 | for(let key1 in _imagesDistribution) |
| 225 | { |
| 226 | let distribution = []; |
| 227 | |
| 228 | for(let key2 in _imagesDistribution[key1]) |
| 229 | { |
| 230 | let image = _imagesDistribution[key1][key2]; |
| 231 | |
| 232 | image.key1 = key1; |
| 233 | image.key2 = key2; |
| 234 | |
| 235 | if(!image.folder && !image.blank) |
| 236 | { |
| 237 | image.name = currentComics[image.index].name; |
| 238 | image.path = currentComics[image.index].path; |
| 239 | image.image = currentComics[image.index].image; |
| 240 | } |
| 241 | else if(image.folder) |
| 242 | { |
| 243 | image.name = currentComics[image.index].name; |
| 244 | image.path = currentComics[image.index].path; |
| 245 | image.image = currentComics[image.index].image; |
| 246 | image.mainPath = currentComics[image.index].mainPath; |
| 247 | image.fristImage = currentComics[image.index].fristImage; |
| 248 | } |
| 249 | |
| 250 | if(readingIsCanvas) |
| 251 | image.canvas = true; |
| 252 | else if(readingIsEbook) |
| 253 | image.ebook = true; |
| 254 | |
| 255 | distribution.push(image); |
| 256 | } |
| 257 | |
| 258 | folderImages.push({key1: key1, distribution: distribution}); |
| 259 | } |
| 260 | |
| 261 | handlebarsContext.folderImages = folderImages; |
| 262 | |
| 263 | let html = template.load('reading.content.right.images.html'); |
| 264 | |
| 265 | let contentRight = template._contentRight(); |
| 266 | |
| 267 | dom.this(contentRight).find('.reading-body > div, .reading-lens > div > div', true).html(html); |
| 268 | |
| 269 | } |
| 270 | |
| 271 | //Calculates the size and position of the images |
| 272 | function calcAspectRatio(first, second) |
no test coverage detected