front_idill/src/mosaic/js/neighbours.js
changeset 79 9eff85166868
parent 77 205409da0f32
--- a/front_idill/src/mosaic/js/neighbours.js	Wed Aug 08 18:42:01 2012 +0200
+++ b/front_idill/src/mosaic/js/neighbours.js	Thu Aug 16 14:32:19 2012 +0200
@@ -172,11 +172,16 @@
 Mosaic.prototype.selectNeighbour = function(neighbour, pointer)
 {
     //Si on est en train de se déplacer vers un voisin ou dézoomer ou si l'aide est affichée, on part.
-    if(this.currentlyMoving || this.currentlyUnzooming || this.helpDisplayed)
+    if(this.currentlyMoving || this.currentlyUnzooming || this.helpDisplayed || this.isSearchByCurvesOn)
     {
         return;
     }
     
+	if(this.config.mouseInteractions)
+	{
+		this.canMoveToNeighbour = true;
+	}
+	
     //Si on est sur une notification de gesture de recherche.
     if(this.gestureDelRequested)
     {
@@ -352,7 +357,14 @@
     var _this = this;
     
     //On ne peut plus se déplacer vers les voisins.
-    this.canMoveToNeighbour = true;
+	if(this.config.mouseInteractions)
+	{
+		this.canMoveToNeighbour = false;
+	}
+	else
+	{
+		this.canMoveToNeighbour = true;
+	}
     
     //On récupère le voisin.
     var neighbourFrame = $('#neighbourFrame-' + neighbourId);
@@ -428,7 +440,7 @@
 						this.moveToNeighbour($('#snapshotDiv-' + this.neighboursIds[idx]));
 					}
 				}
-				else
+				else if(this.config.mouseInteractions)
 				{
 					if(idx == 0 && x > centerWidth || idx == 2 && y > centerHeight || idx == 1 && x < centerWidth || idx == 3 && y < centerHeight)
 					{
@@ -502,7 +514,7 @@
     $('#snapshotDiv-' + destinationId).css('opacity', '1');
     
     //Si le player est prêt.
-    if(_this.player && _this.player.widgets[0] && _this.playerIsReady)
+    if(_this.player && _this.player.widgets && _this.player.widgets[0] && _this.playerIsReady)
     {
         //Si on est en mode timeline on la quitte.
         if(_this.currentMode == 'TIMELINE')
@@ -525,6 +537,7 @@
         //On libère le player.
         _this.player.widgets[0].freePlayer();
         _this.playerIsReady = false;
+		_this.isVideoReading = false;
         $('.LdtPlayer').remove();
         
     }