front_idill/src/mosaic/js/mouseInteractions.js
changeset 89 b6a115568b52
parent 85 b244a7bc0844
child 100 db42ef1faa7a
equal deleted inserted replaced
87:34afef0f9e18 89:b6a115568b52
    39 			this.notifyHelp(true);
    39 			this.notifyHelp(true);
    40 		}
    40 		}
    41 	}
    41 	}
    42 	
    42 	
    43 	//Si on se trouve sur l'icone des crédits et qu'elle est zoomée.
    43 	//Si on se trouve sur l'icone des crédits et qu'elle est zoomée.
    44 	if(this.isCredtisIconZoomed)
    44 	if(this.isCreditsIconZoomed)
    45 	{
    45 	{
    46 		//On affiche les crédits.
    46 		//On affiche les crédits.
    47 		this.notifyCredits();
    47 		this.notifyCredits();
    48 	}
    48 	}
    49 	
    49 	
   290 	if(!this.mouseDownPosX || !this.mouseDownPosY || Math.sqrt((this.mouseDownPosX - x) * (this.mouseDownPosX - x) + (this.mouseDownPosY - y) * (this.mouseDownPosY - y)) > 10)
   290 	if(!this.mouseDownPosX || !this.mouseDownPosY || Math.sqrt((this.mouseDownPosX - x) * (this.mouseDownPosX - x) + (this.mouseDownPosY - y) * (this.mouseDownPosY - y)) > 10)
   291 	{
   291 	{
   292 		return;
   292 		return;
   293 	}
   293 	}
   294 	
   294 	
   295 	//Si on est dans un mode autre qu'un mode zoomé et qu'on n'affiche pas l'aide, on part.
   295 	//Si on est dans un mode autre qu'un mode zoomé et qu'on n'affiche pas l'aide ou les crédits, on part.
   296 	if(this.currentMode != "VIDEO" && this.currentMode != "SEARCH" && this.currentMode != "TIMELINE" && !this.helpDisplayed)
   296 	if(this.currentMode != "VIDEO" && this.currentMode != "SEARCH" && this.currentMode != "TIMELINE" && !this.helpDisplayed && !this.creditsDisplayed)
   297 	{
   297 	{
   298 		return;
   298 		return;
   299 	}
   299 	}
   300 	
   300 	
   301 	//Si on clique en dehors de la video centrale, alors on dézoome.
   301 	//Si on clique en dehors de la video centrale, alors on dézoome.
   342 	{
   342 	{
   343 		this.removeHelp();
   343 		this.removeHelp();
   344 	}
   344 	}
   345 	
   345 	
   346 	//Si les crédits sont affichés, un clic les ferme.
   346 	//Si les crédits sont affichés, un clic les ferme.
   347 	if(this.creditsDisplayed && !this.isCreditsIconZoomed && !this.isCreditsIconZooming)
   347 	if(this.creditsDisplayed && !this.isCreditsIconZoomed && !this.isCreditsIconZooming && !this.isOnCreditsArrow(this.mousePosX, this.mousePosY))
   348 	{
   348 	{
   349 		this.removeCredits();
   349 		this.removeCredits();
   350 	}
   350 	}
       
   351 	
       
   352 	//Si les crédits sont affichés et qu'on est sur une flèche, on change de page.
       
   353 	if(this.isOnCreditsUpArrow(this.mousePosX, this.mousePosY))
       
   354 	{
       
   355 		this.goToPreviousCreditsPage();
       
   356 	}
       
   357 	else if(this.isOnCreditsDownArrow(this.mousePosX, this.mousePosY))
       
   358 	{
       
   359 		this.goToNextCreditsPage();
       
   360 	}
   351 }
   361 }