diff -r 9d7a2aa112fb -r 4e1ee94d70b1 front_idill/src/mosaic/js/zoomInteractions.js --- a/front_idill/src/mosaic/js/zoomInteractions.js Fri Jul 06 13:44:25 2012 +0200 +++ b/front_idill/src/mosaic/js/zoomInteractions.js Mon Jul 09 14:24:42 2012 +0200 @@ -4,7 +4,7 @@ */ mosaic.prototype.preZoom = function(snapshot) { - if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1 || snapshot == null || this.helpDisplayed || this.isMosaicFiltering || this.isSearchByCurvesOn) + if(this.currentMode == "NO-USER" || this.currentMode.indexOf("INCOMING") > -1 || snapshot == null || this.helpDisplayed || this.isMosaicFiltering || this.isSearchByCurvesOn || this.gestureDelRequested) { return; } @@ -16,7 +16,7 @@ this.preUnzoom(); //On enlève les notifications initiales si elles existent. // this.removeSelectionSearchMosaicFull(); - $('.notifications').remove(); + this.removeNotifications(); //Mosaïque. var _this = this; @@ -164,17 +164,17 @@ if(_this.currentMode == 'MOSAIC') { - $('.notifications').remove(); + _this.removeNotifications(); _this.mosaicSelection(); } else if(_this.currentMode == 'FILTER' && !_this.filterSearchedType && _this.curvesGesturesFound) { - $('.notifications').remove(); + _this.removeNotifications(); _this.filterSearchAndSelection(); } else if(_this.currentMode == 'FILTER' && _this.filterSearchedType) { - $('.notifications').remove(); + _this.removeNotifications(); _this.filterGestureAndSelection(_this.filterSearchedType, 'valid'); } }); @@ -214,17 +214,17 @@ if(this.currentMode == 'MOSAIC') { - $('.notifications').remove(); + this.removeNotifications(); this.mosaicSelectionAndSearch(); } else if(_this.currentMode == 'FILTER' && !this.filterSearchedType && !this.curvesGesturesFound) { - $('.notifications').remove(); + this.removeNotifications(); this.filterSearch(); } else if(_this.currentMode == 'FILTER' && this.filterSearchedType && !this.curvesGesturesFound) { - $('.notifications').remove(); + this.removeNotifications(); this.filterGesture(this.filterSearchedType, 'valid'); } /*this.removePointMosaicPrezoom(); @@ -364,6 +364,16 @@ _this.listenToNeighbours(); } + console.log('gesture shown : ' + _this.currentSearchGesture[_this.centerId]); + + if(_this.currentSearchGesture[_this.centerId] != '') + { + _this.currentMode = 'SEARCH'; + _this.isCurrentlyInASearchByGesture = true; + _this.removeNotifications(); + _this.searchGesture(_this.currentSearchGesture[_this.centerId], 'valid'); + } + $('#spinner').remove(); $('#mainPointer').css('background-image', 'url(./img/cursors/pointer.png)'); $('#secondPointer').css('background-image', 'url(./img/cursors/pointer2.png)'); @@ -437,11 +447,11 @@ if(this.mouseInteractions) { - $('body').unbind('click'); - $('body').unbind('mousewheel'); + $(window).unbind('click'); + $(window).unbind('mousewheel'); //On rebind le clic pour supprimer une recherche. - $('body').click(function(e) + $(window).click(function(e) { _this.removeSearchNotificationIfOnIt(e.pageX, e.pageY); }); @@ -563,7 +573,7 @@ //On remet les notifications initiales si on n'est pas dans une recherche par filtrage. if(_this.currentMode == 'MOSAIC' && !_this.filterSearchedType) { - $('.notifications').remove(); + _this.removeNotifications(); // _this.notifySelectionSearchMosaicFull(); _this.mosaicSelectionAndSearch(); }