42 //Mosaïque. |
42 //Mosaïque. |
43 var _this = this; |
43 var _this = this; |
44 //Dimensions de la mosaïque. |
44 //Dimensions de la mosaïque. |
45 var h = this.height, w = this.width; |
45 var h = this.height, w = this.width; |
46 //Longueur en images, nombre d'images et taille de bordure de la mosaïque. |
46 //Longueur en images, nombre d'images et taille de bordure de la mosaïque. |
47 var len = this.config.length, imgs = this.config.imagesToShow, margin = this.marginWidth; |
47 var len = this.config.imagesByLine, imgs = this.config.imagesToShow, margin = this.marginWidth; |
48 //Dimensions et position d'un snapshot dans la mosaïque. |
48 //Dimensions et position d'un snapshot dans la mosaïque. |
49 var snHeight = this.snapshotHeight, snWidth = this.snapshotWidth; |
49 var snHeight = this.snapshotHeight, snWidth = this.snapshotWidth; |
50 var sTop = snapshot.position().top, sLeft = snapshot.position().left; |
50 var sTop = snapshot.position().top, sLeft = snapshot.position().left; |
51 var prezoomPercentage = this.config.prezoomPercentage; |
51 var prezoomPercentage = this.config.prezoomPercentage; |
52 |
52 |
272 //Si la mosaïque est en pleine écran, pas la peine de zoomer. |
272 //Si la mosaïque est en pleine écran, pas la peine de zoomer. |
273 if(this.currentMode == "VIDEO" || this.currentMode == "SEARCH" || this.currentMode.indexOf("INCOMING") > -1 || this.helpDisplayed) |
273 if(this.currentMode == "VIDEO" || this.currentMode == "SEARCH" || this.currentMode.indexOf("INCOMING") > -1 || this.helpDisplayed) |
274 { |
274 { |
275 return; |
275 return; |
276 } |
276 } |
|
277 |
|
278 //Si on est en mode d'interaction souris, on enlève la bordure d'aide. |
|
279 if(this.config.mouseInteractions) |
|
280 { |
|
281 this.removeHelpIcon(); |
|
282 } |
277 |
283 |
278 //On prend les attributs nécessaires au calculs. |
284 //On prend les attributs nécessaires au calculs. |
279 var margin = this.marginWidth, len = this.config.length, imgs = this.config.imagesToShow, zoomedMargin = this.config.zoomedMargin; |
285 var margin = this.marginWidth, len = this.config.imagesByLine, imgs = this.config.imagesToShow, zoomedMargin = this.config.zoomedMargin; |
280 var zoomPercentage = this.config.zoomPercentage; |
286 var zoomPercentage = this.config.zoomPercentage; |
281 var initMPWidth = this.previousZoomedSN.width() * len + margin*len, initMPHeight = this.previousZoomedSN.height() * (imgs / len) + margin*(imgs / len); |
287 var initMPWidth = this.previousZoomedSN.width() * len + margin*len, initMPHeight = this.previousZoomedSN.height() * (imgs / len) + margin*(imgs / len); |
282 var newMPWidth = initMPWidth * len + zoomedMargin * (len), newMPHeight = initMPHeight * (imgs / len) + zoomedMargin * ((imgs / len)); |
288 var newMPWidth = initMPWidth * len + zoomedMargin * (len), newMPHeight = initMPHeight * (imgs / len) + zoomedMargin * ((imgs / len)); |
283 var newPreMPWidth = initMPWidth * len * zoomPercentage + zoomedMargin * (len), newPreMPHeight = initMPHeight * (imgs / len) * zoomPercentage + zoomedMargin * ((imgs / len)); |
289 var newPreMPWidth = initMPWidth * len * zoomPercentage + zoomedMargin * (len), newPreMPHeight = initMPHeight * (imgs / len) * zoomPercentage + zoomedMargin * ((imgs / len)); |
284 |
290 |
332 height: newPreMPHeight, |
338 height: newPreMPHeight, |
333 top: newZoomTop, |
339 top: newZoomTop, |
334 left: newZoomLeft |
340 left: newZoomLeft |
335 }, this.config.zoomTime, function() |
341 }, this.config.zoomTime, function() |
336 { |
342 { |
|
343 //Si on est en mode d'interaction souris, on affiche la bordure d'aide. |
|
344 if(_this.config.mouseInteractions) |
|
345 { |
|
346 _this.helpIcon(); |
|
347 } |
|
348 |
337 _this.snTop = (zoomedImg.position().top + newZoomTop + _this.MPTop_margin), _this.snLeft = (zoomedImg.position().left + newZoomLeft); |
349 _this.snTop = (zoomedImg.position().top + newZoomTop + _this.MPTop_margin), _this.snLeft = (zoomedImg.position().left + newZoomLeft); |
338 _this.snWidth = newSnWidth + 1, _this.snHeight = newSnHeight + 1; |
350 _this.snWidth = newSnWidth + 1, _this.snHeight = newSnHeight + 1; |
339 |
351 |
340 _this.notifyTopVideo = newZoomTop; |
352 _this.notifyTopVideo = newZoomTop; |
341 _this.notifyLeftVideo = newZoomLeft; |
353 _this.notifyLeftVideo = newZoomLeft; |
384 { |
396 { |
385 return; |
397 return; |
386 } |
398 } |
387 |
399 |
388 var _this = this; |
400 var _this = this; |
|
401 |
|
402 //Si on est en mode d'interaction souris, on enlève la bordure d'aide. |
|
403 if(this.config.mouseInteractions) |
|
404 { |
|
405 this.removeHelpIcon(); |
|
406 } |
389 |
407 |
390 //Il n'est plus possible de swiper. |
408 //Il n'est plus possible de swiper. |
391 this.canSwipe = false; |
409 this.canSwipe = false; |
392 |
410 |
393 //Si la TL avait été sélectionnée, on la déselectionne. |
411 //Si la TL avait été sélectionnée, on la déselectionne. |
483 height: mpHeight, |
501 height: mpHeight, |
484 top: '0px', |
502 top: '0px', |
485 left: '0px' |
503 left: '0px' |
486 }, this.config.unzoomTime, function() |
504 }, this.config.unzoomTime, function() |
487 { |
505 { |
|
506 //Si on est en mode d'interaction souris, on affiche la bordure d'aide. |
|
507 if(_this.config.mouseInteractions) |
|
508 { |
|
509 _this.helpIcon(); |
|
510 } |
|
511 |
488 //On n'est plus en plein écran, et on ne peut plus se déplacer vers le prochain voisin. |
512 //On n'est plus en plein écran, et on ne peut plus se déplacer vers le prochain voisin. |
489 _this.fullscreen = false; |
513 _this.fullscreen = false; |
490 _this.canMoveToNeighbour = false; |
514 _this.canMoveToNeighbour = false; |
491 |
515 |
492 //Si on est au point d'interaction maximal. |
516 //Si on est au point d'interaction maximal. |