front_idill/src/mosaic/js/zoomInteractions.js
changeset 44 8393d3473b98
child 45 0e29ae4568a0
equal deleted inserted replaced
43:cefce0845ac5 44:8393d3473b98
       
     1 /*
       
     2  * Zoom sur la position d'une image, 1ère partie. Durant le laps de temps de time ms, l'utilisateur a le choix de zoomer sur une autre image.
       
     3  * Après ce laps de temps, l'image zoom complétement et il n'est plus possible de sélectionner une autre image par pointage.
       
     4  */
       
     5 mosaic.prototype.preZoom = function(snapshot)
       
     6 {
       
     7 	if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1 || snapshot == null || this.helpDisplayed || this.isMosaicFiltering)
       
     8 	{
       
     9 		return;
       
    10 	}
       
    11 	
       
    12     if(this.fullscreen)
       
    13 	{
       
    14         return;
       
    15 	}
       
    16 	this.preUnzoom();
       
    17 	//On enlève les notifications initiales si elles existent.
       
    18 	this.removeSelectionSearchMosaicFull();
       
    19 	
       
    20     //Mosaïque.
       
    21     var _this = this;
       
    22     //Dimensions de la mosaïque.
       
    23     var h = this.height, w = this.width;
       
    24     //Longueur en images, nombre d'images et taille de bordure de la mosaïque.
       
    25     var len = this.config['length'], imgs = this.config['imagesToShow'], margin = this.marginWidth;
       
    26     //Dimensions et position d'un snapshot dans la mosaïque.
       
    27     var snHeight = this.snapshotHeight, snWidth = this.snapshotWidth;
       
    28     var sTop = snapshot.position().top, sLeft = snapshot.position().left;
       
    29     var prezoomPercentage = this.config['prezoomPercentage'];
       
    30     
       
    31     //ID de l'image actuelle.
       
    32     var currentId = $('img', snapshot).attr('id');
       
    33     
       
    34     //Si un zoom est déjà en cours, on ne zoom sur rien d'autre en attendant que ce snapshot ai dézoomé en cas de mouseleave.
       
    35     if(this.zoomed)
       
    36 	{
       
    37 		/*var currentSN = this.pointerPositionToSN(pointerX, pointerY);
       
    38 		if(currentSN != null && currentSN.attr('id') != snapshot.attr('id'))
       
    39 		{
       
    40 			this.preUnzoom();
       
    41 		}*/
       
    42         // if($('#preZoomContainer-' + currentId) != $(this) && this.previousZoomedSN != '' && this.previousId != '')
       
    43         /*if(this.previousZoomedSN.attr('id') !== snapshot.attr('id'))
       
    44 		{
       
    45             this.preUnzoom();
       
    46 		}
       
    47         else
       
    48 		{
       
    49             return;
       
    50 		}*/
       
    51 		this.preUnzoom();
       
    52 		// return;
       
    53 	}
       
    54     
       
    55     //On indique qu'on a zoomé et on spécifie le snapshot sur lequel on a zoomé.
       
    56     this.zoomed = true;
       
    57     this.previousZoomedSN = snapshot;
       
    58     this.previousId = currentId;
       
    59     
       
    60     //On récupère les attributs de l'image.
       
    61     var fakeImg = $('img', snapshot);
       
    62     //On forme la balise de la fausse image et on passe son url pour les grands snapshots.
       
    63     fakeImg = '<img id="fake-' + currentId + '" class="snapshots" src="' + fakeImg.attr('src').replace('-little/', '/') + '" />';
       
    64     //On génère un faux snapshot identique au précédent et qu'on va coller dessus.
       
    65     var fakeSnapshot = '<div id="prezoomContainer-' + currentId + '" class="prezoomContainers"><div id="prezoomSnapshot-' + currentId + '" class="snapshotDivs">' + fakeImg + '</div></div>';
       
    66     
       
    67     //On l'ajoute à la mosaïque.
       
    68     $('#mainPanel').append(fakeSnapshot);
       
    69     //On modifie ses attributs.
       
    70 	// console.log('cid : ' + currentId, $('#fake-' + currentId).length);
       
    71     $('#fake-' + currentId).load(function()
       
    72     {
       
    73 	// snapshot.fadeTo(400, '0.5').delay(200).fadeTo(400, '1');
       
    74 		$('#prezoomContainer-' + currentId).css('display', 'block');
       
    75         $('#prezoomContainer-' + currentId).css('top', sTop).css('left', sLeft).css('width', (snWidth + margin)).css('height', (snHeight + margin));
       
    76         $('#prezoomSnapshot-' + currentId).css('width', (snWidth)).css('height', (snHeight));
       
    77         
       
    78         //Dimensions et coordonnées initiales du div sur lequel on zoom.
       
    79         var initialDivWidth = $('#prezoomContainer-' + currentId).width(), initialDivHeight = $('#prezoomContainer-' + currentId).height();
       
    80         var initialDivTop = $('#prezoomContainer-' + currentId).position().top, initialDivLeft = $('#prezoomContainer-' + currentId).position().left;
       
    81         //Dimensions et coordonnées finales du div.
       
    82         var finalDivWidth = initialDivWidth * (prezoomPercentage+1), diffWidth = finalDivWidth - initialDivWidth, finalDivHeight = initialDivHeight + diffWidth;
       
    83         var finalDivTop = (initialDivTop - (finalDivHeight - snHeight)/2), finalDivLeft = (initialDivLeft - (finalDivWidth - snWidth)/2);
       
    84         
       
    85         //CAS PARTICULIER pour la position du snapshot zoomé : les bordures.
       
    86         if(finalDivTop < 0)
       
    87 		{
       
    88             finalDivTop = -margin;
       
    89 		}
       
    90         if(finalDivTop + finalDivHeight > h)
       
    91 		{
       
    92             finalDivTop = h - finalDivHeight;
       
    93 		}
       
    94         if(finalDivLeft < 0)
       
    95 		{
       
    96             finalDivLeft = 0;
       
    97 		}
       
    98         if(finalDivLeft + finalDivWidth + margin*2 > w)
       
    99 		{
       
   100             finalDivLeft = w - finalDivWidth - margin*2;
       
   101 		}
       
   102         
       
   103         ////Code de debug.
       
   104         ////CAUTION////
       
   105         /*var red = '<div id="red"></div>';
       
   106         if($('#red') != null || $('#red') != undefined)
       
   107             $('body').append(red);
       
   108         $('#red').css('background-color', '#FF0000').css('position', 'absolute').css('top', '0px').css('left', '0px').css('width', '100px').css('height', '100px');
       
   109         $('#red').css('top', finalDivTop).css('left', finalDivLeft).css('width', finalDivWidth).css('height', finalDivHeight);*/
       
   110         //alert("initial : " + initialDivWidth + " " + initialDivHeight + " ; final : " + finalDivWidth + " " + finalDivHeight);
       
   111         ////CAUTION////
       
   112         
       
   113         //On prézoom le div en le centrant sur le milieu du snapshot pointé.
       
   114         $('#prezoomSnapshot-' + currentId).animate(
       
   115         {
       
   116             width: finalDivWidth + margin,
       
   117             height: finalDivHeight - margin*2,
       
   118             top: finalDivTop + margin,
       
   119             left: finalDivLeft + margin
       
   120         }, _this.config['timePrezoom']);
       
   121         $('#prezoomContainer-' + currentId).animate(
       
   122         {
       
   123             width: finalDivWidth + margin*2,
       
   124             height: finalDivHeight - margin,
       
   125             top: finalDivTop + margin,
       
   126             left: finalDivLeft
       
   127         }, _this.config['timePrezoom'], function()
       
   128 		{
       
   129 			//On met le spinner gif sur le pointeur, s'il n'existe pas déjà.
       
   130 			if($('#spinner').length == 0)
       
   131 			{
       
   132 				//On repère le pointeur ayant provoqué le prezoom.
       
   133 				var prezoomPointer;
       
   134 				if(!this.isMainPointerDisplayed)
       
   135 				{
       
   136 					prezoomPointer = $('#secondPointer');
       
   137 				}
       
   138 				if(!this.isSecondPointerDisplayed)
       
   139 				{
       
   140 					prezoomPointer = $('#mainPointer');
       
   141 				}
       
   142 				
       
   143 				var spinner = "<img id='spinner'></div>";
       
   144 				$('body').append(spinner);
       
   145 				$('#spinner').css(
       
   146 				{
       
   147 					position: 'absolute',
       
   148 					top: prezoomPointer.position().top,
       
   149 					left: prezoomPointer.position().left,
       
   150 					width: 85,
       
   151 					height: 85,
       
   152 					'z-index': 600
       
   153 				});
       
   154 				$('#spinner').attr('src', './img/cursors/selector_anim_2.gif');
       
   155 			}
       
   156 			
       
   157 			if(_this.currentMode == 'MOSAIC')
       
   158 			{
       
   159 				$('.notifications').remove();
       
   160 				_this.mosaicSelection();
       
   161 			}
       
   162 			else if(_this.currentMode == 'FILTER' && !_this.filterSearchedType)
       
   163 			{
       
   164 				$('.notifications').remove();
       
   165 				_this.filterSearchAndSelection();
       
   166 			}
       
   167 			else if(_this.currentMode == 'FILTER' && _this.filterSearchedType)
       
   168 			{
       
   169 				$('.notifications').remove();
       
   170 				_this.filterGestureAndSelection(_this.filterSearchedType, 'valid');
       
   171 			}
       
   172 		});
       
   173 		
       
   174 		
       
   175     });
       
   176     
       
   177 	this.zoomTimeout = setTimeout(function()
       
   178 	{
       
   179 		_this.zoom();
       
   180 	}, this.config['timeoutZoom']);
       
   181     //Si on clique sur le snapshot prézoomé, on enclenche un zoom total sur ce snapshot.
       
   182     /*$('#prezoomContainer-' + currentId).click(function ()
       
   183     {
       
   184         if(this.previousZoomedSN != '')
       
   185 		{
       
   186             _this.zoom();
       
   187 		}
       
   188     });*/
       
   189 }
       
   190 
       
   191 /*
       
   192  * Dézoome sur la position de l'image. Il est à noter que ce dézoome diffère du dézoom global dans la mesure où celui-ci ne concerne que l'image sur laquelle on a zoomé.
       
   193  */
       
   194 mosaic.prototype.preUnzoom = function()
       
   195 {
       
   196     //Si on n'a pas zoomé, on quitte la fonction.
       
   197     /*if(!this.zoomed)
       
   198 	{
       
   199         return;
       
   200 	}*/
       
   201 	
       
   202 	/*if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1)
       
   203 	{
       
   204 		return;
       
   205 	}*/
       
   206 	
       
   207 	$('#spinner').remove();
       
   208 	
       
   209 	var _this = this;
       
   210 	
       
   211 	clearTimeout(this.zoomTimeout);
       
   212 	
       
   213 	if(this.currentMode == 'MOSAIC')
       
   214 	{
       
   215 		$('.notifications').remove();
       
   216 		this.mosaicSelectionAndSearch();
       
   217 	}
       
   218 	else if(_this.currentMode == 'FILTER' && !this.filterSearchedType)
       
   219 	{
       
   220 		$('.notifications').remove();
       
   221 		this.filterSearch();
       
   222 	}
       
   223 	else if(_this.currentMode == 'FILTER' && this.filterSearchedType)
       
   224 	{
       
   225 		$('.notifications').remove();
       
   226 		this.filterGesture(this.filterSearchedType, 'valid');
       
   227 	}
       
   228 	/*this.removePointMosaicPrezoom();
       
   229 	this.notifySelectionSearchMosaicFull();*/
       
   230     
       
   231     //On spécifie la marge afin de centrer le prédézoom.
       
   232     var margin = this.marginWidth;
       
   233     //ID du snapshot précédemment pointé.
       
   234     var id = this.previousId;
       
   235     //On ne zoom plus.
       
   236     //this.zoomed = false;
       
   237     //On rétrécit le snapshot de prézoom, puis on le supprime en donnant l'illusion qu'il s'agissait du véritable snapshot, alors qu'en fait c'était un clone.
       
   238 	for(var i = 0 ; i < this.config['imagesToShow'] ; i++)
       
   239 	{
       
   240 		if($('#prezoomContainer-snapshot-' + i).length > 0)
       
   241 		{
       
   242 			$('#prezoomContainer-snapshot-' + i).animate(
       
   243 			{
       
   244 				width: this.snapshotWidth + margin,
       
   245 				height: this.snapshotHeight + margin,
       
   246 				top: $('#snapshotDiv-' + i).position().top,//this.previousZoomedSN.position().top,
       
   247 				left: $('#snapshotDiv-' + i).position().left//this.previousZoomedSN.position().left
       
   248 			}, this.config['preUnzoomTime'], function(){ $(this).remove(); _this.zoomed = false; });
       
   249 			$('#prezoomSnapshot-snapshot-' + i).animate(
       
   250 			{
       
   251 				width: this.snapshotWidth,
       
   252 				height: this.snapshotHeight,
       
   253 				top: $('#snapshotDiv-' + i).position().top,//this.previousZoomedSN.position().top,
       
   254 				left: $('#snapshotDiv-' + i).position().left//this.previousZoomedSN.position().left
       
   255 			}, this.config['preUnzoomTime']);
       
   256 		}
       
   257 	}
       
   258 	
       
   259     /*$('#prezoomSnapshot-' + id).animate(
       
   260     {
       
   261         width: this.snapshotWidth,
       
   262         height: this.snapshotHeight,
       
   263         top: this.previousZoomedSN.position().top,
       
   264         left: this.previousZoomedSN.position().left
       
   265     }, this.config['preUnzoomTime']);
       
   266     $('#prezoomContainer-' + id).animate(
       
   267     {
       
   268         width: this.snapshotWidth + margin,
       
   269         height: this.snapshotHeight + margin,
       
   270         top: this.previousZoomedSN.position().top,
       
   271         left: this.previousZoomedSN.position().left
       
   272     }, this.config['preUnzoomTime'], function(){ $(this).remove(); _this.zoomed = false; });*/
       
   273 }
       
   274 
       
   275 
       
   276 /*
       
   277  * Zoom d'un snapshot en plein écran.
       
   278  */
       
   279 mosaic.prototype.zoom = function()
       
   280 {
       
   281     var _this = this;
       
   282     
       
   283     //Si la mosaïque est en pleine écran, pas la peine de zoomer.
       
   284     if(this.currentMode == "VIDEO" || this.currentMode == "SEARCH" || this.currentMode.indexOf("INCOMING") > -1 || this.helpDisplayed)
       
   285 	{
       
   286         return;
       
   287 	}
       
   288     
       
   289     //On prend les attributs nécessaires au calculs.
       
   290     var margin = this.marginWidth, len = this.config['length'], imgs = this.config['imagesToShow'], zoomedMargin = this.config['zoomedMargin'];
       
   291 	var zoomPercentage = this.config['zoomPercentage'];
       
   292     var initMPWidth = this.previousZoomedSN.width() * len + margin*len, initMPHeight = this.previousZoomedSN.height() * (imgs / len) + margin*(imgs / len);
       
   293     var newMPWidth = initMPWidth * len + zoomedMargin * (len), newMPHeight = initMPHeight * (imgs / len) + zoomedMargin * ((imgs / len));
       
   294     var newPreMPWidth = initMPWidth * len * zoomPercentage + zoomedMargin * (len), newPreMPHeight = initMPHeight * (imgs / len) * zoomPercentage + zoomedMargin * ((imgs / len));
       
   295     
       
   296     //Dimensions et coordonnées initiales du div sur lequel on zoom.
       
   297     var initialDivWidth = this.previousZoomedSN.width(), initialDivHeight = this.previousZoomedSN.height();
       
   298     var initialDivTop = this.previousZoomedSN.position().top, initialDivLeft = this.previousZoomedSN.position().left;
       
   299     //Dimensions et coordonnées finales du div.
       
   300     var finalDivWidth = initialDivWidth * (zoomPercentage+1), finalDivHeight = initialDivHeight * (zoomPercentage+1);
       
   301     var newZoomTop = -this.previousZoomedSN.position().top*(newPreMPHeight/initMPHeight) - zoomedMargin/2 + (initMPHeight - initMPHeight * zoomPercentage)/2, newZoomLeft = -this.previousZoomedSN.position().left*(newPreMPWidth/initMPWidth) - zoomedMargin/2 + (initMPWidth - initMPWidth * zoomPercentage)/2;
       
   302     var newSnWidth = initMPWidth * zoomPercentage, newSnHeight = initMPHeight * zoomPercentage;
       
   303     
       
   304     this.preUnzoom(this);
       
   305     /*SINGULARITE*/
       
   306     this.fullscreen = true;
       
   307     
       
   308     //On passe l'image du snapshot pointé en HD.
       
   309     var zoomedImg = $('img', this.previousZoomedSN);
       
   310     var src = zoomedImg.attr('src');
       
   311     zoomedImg.attr('src', src.replace('-little/', '/'));
       
   312     
       
   313     //On récupère son ID.
       
   314     var tab, zoomedImgId;
       
   315     tab = _this.previousId.split('-');
       
   316     zoomedImgId = tab[1];
       
   317 	
       
   318 	//On donne les dimensions des snapshots.
       
   319 	$('.snapshotDivs').animate(
       
   320 	{
       
   321 		width: newSnWidth,
       
   322 		height: newSnHeight,
       
   323 		margin: zoomedMargin/2 + 'px',
       
   324 	}, this.config['zoomTime']);
       
   325 	
       
   326 	if(this.currentMode != 'NO-USER')
       
   327 	{
       
   328 		//Les snapshots baissent alors en opacité, donnant l'impression qu'ils sont grisés.
       
   329 		$('.snapshotDivs').animate(
       
   330 		{
       
   331 			opacity: '0.4'
       
   332 		}, this.config['zoomTime']);
       
   333 		//Le snapshot du milieu revient à une opacité optimale, ce qui attire l'attention de l'utilisateur.
       
   334 		$(this.previousZoomedSN).animate(
       
   335 		{
       
   336 			opacity: '1'
       
   337 		}, this.config['zoomTime']);
       
   338 	}
       
   339 	// console.log('BBB1 : ' + this.currentMode);
       
   340     //On zoome sur la mosaïque.
       
   341     $('#mainPanel').animate(
       
   342     {
       
   343         width: newPreMPWidth,
       
   344         height: newPreMPHeight,
       
   345         top: newZoomTop,
       
   346         left: newZoomLeft
       
   347     }, this.config['zoomTime'], function()
       
   348     {
       
   349         _this.snTop = (zoomedImg.position().top + newZoomTop + _this.MPTop_margin), _this.snLeft = (zoomedImg.position().left + newZoomLeft);
       
   350 		_this.snWidth = newSnWidth + 1, _this.snHeight = newSnHeight + 1;
       
   351 		
       
   352 		_this.notifyTopVideo = newZoomTop;
       
   353 		_this.notifyLeftVideo = newZoomLeft;
       
   354 		
       
   355 		//On charge les interactions avec les voisins.
       
   356         _this.centerId = zoomedImgId;
       
   357 		// console.log('BBB2 : ' + _this.currentMode);
       
   358 		if(_this.currentMode != "NO-USER")
       
   359 		{
       
   360 			// console.log('PROBLEM');
       
   361 			_this.currentMode = 'VIDEO';
       
   362 			_this.listenToNeighbours();
       
   363 		}
       
   364 		
       
   365 		$('#spinner').remove();
       
   366 		$('#mainPointer').css('background-image', 'url(./img/cursors/pointer.png)');
       
   367 		$('#secondPointer').css('background-image', 'url(./img/cursors/pointer2.png)');
       
   368 		
       
   369 		// console.log('BBB3 : ' + _this.currentMode);
       
   370 		_this.loadPlayer(_this.snTop, _this.snLeft, _this.snWidth, _this.snHeight, newZoomTop, newZoomLeft, _this.timeToGoAt[_this.centerId]);
       
   371     });
       
   372 }
       
   373 
       
   374 /*
       
   375  * Retour à la taille normale de la mosaïque.
       
   376  */
       
   377 mosaic.prototype.unzoom = function()
       
   378 {
       
   379     //Si on n'est pas en plein écran, on quitte.
       
   380 	// console.log("'" + this.currentMode + "'");
       
   381     if(this.currentMode != "SEARCH" && this.currentMode != "VIDEO" && this.currentMode != "NO-USER" && this.currentMode.indexOf("INCOMING") == -1)
       
   382 	{
       
   383         return;
       
   384 	}
       
   385 	
       
   386 	this.canSwipe = false;
       
   387 	
       
   388 	//Si la TL avait été sélectionnée, on la déselectionne.
       
   389 	if(this.currentMode == 'TIMELINE')
       
   390 	{
       
   391 		this.exitTimeline('move');
       
   392 	}
       
   393 	
       
   394 	this.currentlyUnzooming = true;
       
   395 	
       
   396 	this.removeAdditionalNeighbours();
       
   397 	this.deselectAllNeighbours();
       
   398 	
       
   399 	this.snTop = 0;
       
   400 	this.snLeft = 0;
       
   401 	this.Width = 0;
       
   402 	this.snHeight = 0;
       
   403     
       
   404     //On charge les attributs nécessaires aux calculs.
       
   405     var sWidth = this.snapshotWidth, sHeight = this.snapshotHeight;
       
   406     var mpWidth = this.width, mpHeight = this.height;
       
   407     var _this = this;
       
   408     
       
   409     //On passe le snapshot sur lequel on a zoomé en SD.
       
   410     var zoomedImg = $('img', this.previousZoomedSN);
       
   411     var src = zoomedImg.attr('src');
       
   412     zoomedImg.attr('src', src.replace('snapshots/', 'snapshots-little/'));
       
   413 	
       
   414 	if(_this.player.widgets && _this.player.widgets[0])
       
   415 	{
       
   416 		// console.log(Math.floor(_this.player.popcorn.currentTime()));
       
   417 		_this.timeToGoAt[_this.centerId] = Math.floor(_this.player.popcorn.currentTime());
       
   418 		_this.player.widgets[0].freePlayer();
       
   419 	}
       
   420 	
       
   421 	_this.playerIsReady = false;
       
   422 	$('.LdtPlayer').remove();
       
   423 	$('body').append('<div class="LdtPlayer" id="LdtPlayer"></div>');
       
   424 	_this.reaffectKeyPress();
       
   425     
       
   426     //On rend leur opacité aux snapshots. Qui ne sont alors plus grisés.
       
   427     $('.snapshotDivs').animate(
       
   428     {
       
   429         width: sWidth,
       
   430         height: sHeight,
       
   431         margin: this.marginWidth/2 + 'px'
       
   432     }, this.config['unzoomTime'], function()
       
   433 	{
       
   434 		_this.neighboursIds.length = 0;
       
   435 		_this.currentlyUnzooming = false;
       
   436 	});
       
   437 	
       
   438 	if(this.currentMode != 'NO-USER')
       
   439 	{
       
   440 		if(this.currentMode.indexOf("INCOMING") == -1 && !this.isMosaicFiltered)
       
   441 		{
       
   442 			$('.snapshotDivs').animate(
       
   443 			{
       
   444 				opacity: '1'
       
   445 			}, this.config['unzoomTime']);
       
   446 		}
       
   447 		else if(this.currentMode.indexOf("INCOMING") == -1 && this.isMosaicFiltered)
       
   448 		{
       
   449 			for(var i = 0 ; i < this.config['imagesToShow'] ; i++)
       
   450 			{
       
   451 				$('#snapshotDiv-' + i).animate(
       
   452 				{
       
   453 					opacity: this.opacities[i]
       
   454 				}, this.config['unzoomTime']);
       
   455 			}
       
   456 		}
       
   457 	}
       
   458 	else
       
   459 	{
       
   460 		// console.log('init');
       
   461 		this.previousZoomedSN.fadeTo(this.config['unzoomTime'], 0, function()
       
   462 		{
       
   463 			_this.init();
       
   464 		});
       
   465 	}
       
   466 	
       
   467     //On dézoom sur la mosaïque.
       
   468     $('#mainPanel').animate(
       
   469     {
       
   470         width: mpWidth,
       
   471         height: mpHeight,
       
   472         top: '0px',
       
   473         left: '0px'
       
   474     }, this.config['unzoomTime'], function()
       
   475     {
       
   476         //On n'est plus en plein écran, et on ne peut plus se déplacer vers le prochain voisin.
       
   477         _this.fullscreen = false;
       
   478         _this.canMoveToNeighbour = false;
       
   479 		
       
   480 		if(_this.currentMode != 'NO-USER' && _this.currentMode.indexOf('INCOMING-') == -1)
       
   481 		{
       
   482 			if(_this.isMosaicFiltered)
       
   483 			{
       
   484 				//On revient en mode FILTER.
       
   485 				_this.currentMode = 'FILTER';
       
   486 			}
       
   487 			else
       
   488 			{
       
   489 				//On revient en mode MOSAIC.
       
   490 				_this.currentMode = 'MOSAIC';
       
   491 			}
       
   492 			
       
   493 			//On ne permet plus le déplacement vers les voisins.
       
   494 			/*$('.snapshotDivs').unbind('mouseover', function()
       
   495 			{
       
   496 				_this.selectNeighbour();
       
   497 			});*/
       
   498 			
       
   499 			//On remet les notifications initiales si on n'est pas dans une recherche par filtrage.
       
   500 			if(_this.currentMode == 'MOSAIC' && !_this.filterSearchedType)
       
   501 			{
       
   502 				$('.notifications').remove();
       
   503 				// _this.notifySelectionSearchMosaicFull();
       
   504 				_this.mosaicSelectionAndSearch();
       
   505 			}
       
   506 		}
       
   507 		
       
   508 		this.currentlyUnzooming = false;
       
   509     });
       
   510 }