front_idill/src/mosaic/js/notifications.js
author bastiena
Mon, 23 Jul 2012 16:59:35 +0200
changeset 52 277c94533395
parent 47 4e1ee94d70b1
child 55 afd60399a7b5
permissions -rw-r--r--
Front IDILL : doc updated swipe factorized search bug fixed : when a search is not complete
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     1
/*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     2
* This file is part of the TraKERS\Front IDILL package.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     3
*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     4
* (c) IRI <http://www.iri.centrepompidou.fr/>
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     5
*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     6
* For the full copyright and license information, please view the LICENSE
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     7
* file that was distributed with this source code.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     8
*/
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
     9
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    10
/*
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    11
 * Projet : TraKERS
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    12
 * Module : Front IDILL
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    13
 * Fichier : notifications.js
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    14
 * 
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    15
 * Auteur : alexandre.bastien@iri.centrepompidou.fr
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    16
 * 
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    17
 * Fonctionnalités : Définit les fonctions de notification (images apparaissant en haut de la fenêtre).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    18
 */
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    19
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    20
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    21
 * Affiche l'aide.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    22
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    23
 * mosaic > fonction manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    24
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    25
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    26
Mosaic.prototype.notifyHelp = function(inMosaic)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
    27
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    28
    //Si elle est déjà affichée on quitte.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    29
    if(this.helpDisplayed)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    30
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    31
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    32
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    33
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    34
    //On enlève les autres notifications.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    35
    this.removeNotifications();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    36
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    37
    //On indique qu'elle est affiché.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    38
    this.helpDisplayed = true;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    39
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    40
    //Section des courbes de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    41
    var search_2hands_tab;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    42
    //Section des recherches corporelles.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    43
    var search_body_tab;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    44
    //Section des actions de contrôle sur l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    45
    var controls_1hand_tab;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    46
    //Opacités (indique si elles sont actuellement implémentées).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    47
    var search_2hands_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    48
    var search_body_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    49
    var controls_1hand_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    50
    var controls_1hand_tab_opacities;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    51
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    52
    //Dossier contenant les images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    53
    var img_directory = './pictos/help/';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    54
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    55
    //Si on est en mode d'intéraction souris, la recherche corporelle se fait par des courbes. On les regroupes donc dans la section des courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    56
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    57
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    58
        search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave', 'chute', 'knee_up', 'jump', 'bend'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    59
        search_2hands_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    60
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    61
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    62
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    63
        search_2hands_tab = ['arret', 'contact', 'grandjete', 'group_spin', 'port_de_bras', 'spin', 'up_down', 'wave'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    64
        search_body_tab = ['chute', 'knee_up', 'jump', 'bend'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    65
        search_2hands_tab_opacities = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    66
        search_body_tab_opacities = [1, 1, 1, 1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    67
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    68
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    69
    //Dans la mosaique, on ne peut que sélectionner un snapshot.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    70
    if(inMosaic)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    71
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    72
        controls_1hand_tab = ['selection'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    73
        controls_1hand_tab_opacities = [1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    74
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    75
    //Dans une vidéo, on peut aller d'un voisin à l'autre, bouger dans la timeline, dézoomer et swiper d'un marqueur à l'autre.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    76
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    77
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    78
        controls_1hand_tab = ['deplacer', 'precedent', 'suivant', 'mosaique_horizontal', 'mosaique_vertical', 'move_down', 'move_up', 'move_right', 'move_left'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    79
        controls_1hand_tab_opacities = [1, 1, 1, 1, 1, 1, 1, 1, 1];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    80
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    81
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    82
    //Colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    83
    //Titre de la colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    84
    var search_title = "<div id='search_title'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    85
    //Image de la colonne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    86
    var search_img = "<div id='search_img' class='notify_imgs'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    87
    //Sous-titre.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    88
    var search_2hands_text = "<div id='search_2hands_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    89
    //Images de recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    90
    var search_2hands_imgs = "<div id='search_2hands_imgs' class='notify_imgs_big'>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    91
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    92
    //On crée les images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    93
    for(var i = 0 ; i < search_2hands_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    94
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    95
        search_2hands_imgs += "<div id='2hands_" + search_2hands_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_2hands_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    96
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    97
    search_2hands_imgs += "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    98
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
    99
    //Sous-titre de la zone de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   100
    var search_body_text;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   101
    //Images de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   102
    var search_body_imgs;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   103
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   104
    //Si on est en mode Kinect.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   105
    if(!this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   106
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   107
        //On crée le texte et les images de la recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   108
        search_body_text = "<div id='search_body_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   109
        search_body_imgs = "<div id='search_body_imgs' class='notify_imgs'>"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   110
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   111
        for(var i = 0 ; i < search_body_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   112
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   113
            search_body_imgs += "<div id='body_" + search_body_tab[i] + "' class='notify_imgs_small' style='opacity: " + search_body_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   114
        }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   115
        search_body_imgs += "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   116
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   117
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   118
    //Titre de la colonne des actions de contrôle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   119
    var controls_title = "<div id='controls_title'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   120
    //Image de la colonne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   121
    var controls_img = "<div id='controls_img' class='notify_imgs'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   122
    //Sous-titre de la zone de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   123
    var controls_1hand_text = "<div id='controls_1hand_text'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   124
    //Images des actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   125
    var controls_1hand_imgs;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   126
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   127
    controls_1hand_imgs = "<div id='controls_1hand_imgs' class='notify_imgs'>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   128
    for(var i = 0 ; i < controls_1hand_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   129
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   130
        controls_1hand_imgs += "<div id='1hand_" + controls_1hand_tab[i] + "' class='notify_imgs_small' style='opacity: " + controls_1hand_tab_opacities[i] + ";'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   131
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   132
    controls_1hand_imgs += "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   133
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   134
    //Colonne de recherche du panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   135
    var help_search;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   136
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   137
    //Dans le mode d'intéraction souris, les gestures de recherche corporelles ont été intégrées aux courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   138
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   139
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   140
        help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   141
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   142
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   143
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   144
        help_search = "<div id='help_search'>" + search_title + search_img + search_2hands_text + search_2hands_imgs + search_body_text + search_body_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   145
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   146
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   147
    //Colonne de contrôle du panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   148
    var help_controls;
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   149
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   150
    help_controls = "<div id='help_controls'>" + controls_title + controls_img + controls_1hand_text + controls_1hand_imgs + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   151
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   152
    //Panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   153
    var notification_help = "<div id='notify_help'>" + help_search + "<div id='help_sep'></div>" + help_controls + "</div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   154
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   155
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   156
    $('body').append(notification_help);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   157
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   158
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   159
    var notify_width = $(window).width(), notify_height = $(window).height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   160
    var notify_margin = parseInt($('#notify_help').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   161
    var notify_ = 10;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   162
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   163
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   164
    $('#notify_help').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   165
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   166
        left: "0px",
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   167
        top: "0px",
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   168
        width: notify_width - notify_margin * 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   169
        height: notify_height - notify_margin * 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   170
        'z-index': 1000
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   171
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   172
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   173
    //Taille des marges des images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   174
    var margins = parseInt($('.notify_imgs_small').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   175
    //Largeur des images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   176
    var widths = $('.notify_imgs_small').width();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   177
    //Hauteur des images.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   178
    var heights = $('.notify_imgs_small').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   179
    //Position horizontale du séparateur de colonnes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   180
    var sep_left = $('#help_sep').position().left;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   181
    //Marge du panneau d'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   182
    var help_margin = parseInt($('#notify_help').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   183
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   184
    //On calcule la taille d'une zone de recherche (une des deux parties).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   185
    var help_column_width = sep_left - help_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   186
    //Longueur d'une image.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   187
    var img_width = (margins * 2 + widths);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   188
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   189
    //On récupère le nombre d'images affichables horizontalement pour les gestures de recherche à deux mains dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   190
    var search_2hands_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   191
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   192
    var search_2hands_padding_left = (help_column_width - search_2hands_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   193
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   194
    //On positionne la section de recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   195
    $('#search_2hands_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   196
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   197
        'padding-left': search_2hands_padding_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   198
        'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   199
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   200
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   201
    //On récupère le nombre d'images affichables horizontalement pour les gestures de recherche corporelles dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   202
    var search_body_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   203
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   204
    var search_body_padding_left = (help_column_width - search_body_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   205
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   206
    //On positionne la section de recherche par gestures corporelles.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   207
    $('#search_body_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   208
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   209
        'padding-left': search_body_padding_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   210
        'height': ($('.notify_imgs_small').height() * 2 + parseInt($('.notify_imgs_small').css('margin')))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   211
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   212
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   213
    //On récupère le nombre d'images affichables horizontalement pour les gestures de controle dans une des parties de l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   214
    var controls_1hand_n_imgs = Math.floor(help_column_width / img_width);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   215
    //Calcul du padding-left de cette section.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   216
    var controls_1hand_padding_left = (help_column_width - controls_1hand_n_imgs * img_width) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   217
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   218
    //On potisionne la section des actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   219
    $('#controls_1hand_imgs').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   220
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   221
        'padding-left': controls_1hand_padding_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   222
        'height': ($('.notify_imgs_small').height())
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   223
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   224
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   225
    //Longueur de la colonne de recherche.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   226
    var search_width = $('#help_search').width();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   227
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   228
    $('#search_title').html('Recherche');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   229
    var MI = '';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   230
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   231
    //Le texte de recherche et les images changent en fonction du mode d'intéraction (souris/Kinect).
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   232
    if(this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   233
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   234
        $('#search_2hands_text').html('Courbes à effectuer avec la souris');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   235
        MI = 'MI/';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   236
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   237
    else
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   238
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   239
        $('#search_2hands_text').html('Gestes à effectuer avec les deux mains');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   240
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   241
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   242
    //On affecte les images pour la recherche par courbes.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   243
    for(var i = 0 ; i < search_2hands_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   244
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   245
        $("#2hands_" + search_2hands_tab[i]).css("background-image", "url('" + img_directory + MI + search_2hands_tab[i] + ".png')");
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   246
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   247
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   248
    //Si on est en mode Kinect, on affecte les images de recherche corporelle.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   249
    if(!this.config.mouseInteractions)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   250
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   251
        $('#search_body_text').html('Gestes à effectuer avec le corps entier');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   252
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   253
        for(var i = 0 ; i < search_body_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   254
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   255
            $("#body_" + search_body_tab[i]).css("background-image", "url('" + img_directory + search_body_tab[i] + ".png')");
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   256
        }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   257
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   258
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   259
    //Actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   260
    $('#controls_title').html('Contrôles');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   261
    $('#controls_1hand_text').html('Gestes à effectuer avec une seule main');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   262
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   263
    //On affecte les images des actions de contrôle de l'interface.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   264
    for(var i = 0 ; i < controls_1hand_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   265
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   266
        $("#1hand_" + controls_1hand_tab[i]).css("background-image", "url('" + img_directory + controls_1hand_tab[i] + ".png')");
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   267
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   268
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   269
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   270
    $('#notify_help').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   271
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   272
        opacity: "1"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   273
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   274
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   275
    $('.notify_imgs_big').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   276
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   277
        opacity: "1"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   278
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   279
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   280
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   281
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   282
 * Supprime l'aide.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   283
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   284
 * pointers > fonction detectIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   285
 * mosaic > fonction manageControlEvents et onClick.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   286
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   287
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   288
Mosaic.prototype.removeHelp = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   289
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   290
    //Si l'aide n'est pas affichée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   291
    if(!this.helpDisplayed)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   292
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   293
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   294
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   295
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   296
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   297
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   298
    //On fait disparaître l'aide.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   299
    $('#notify_help').fadeOut(this.timeNotifyFade, function()
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   300
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   301
        //On indique que l'aide n'est plus affichée, et on détruit le panneau.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   302
        _this.helpDisplayed = false;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   303
        _this.canNotifyHelp = true;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   304
        $('#notify_help').remove();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   305
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   306
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   307
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   308
/*
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   309
 * Affichage de la notification de sélection & recherche dans la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   310
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   311
 * zoomInteractions > fonctions preUnzoom et unzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   312
 * mosaic > fonction showNImages.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   313
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   314
Mosaic.prototype.mosaicSelectionAndSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   315
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   316
    //Si on n'est pas en mode mosaic, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   317
    if(this.currentMode != 'MOSAIC')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   318
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   319
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   320
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   321
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   322
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   323
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   324
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   325
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   326
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   327
    $('body').append(notification_selection + notification_search);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   328
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   329
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   330
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   331
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   332
    var selection_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   333
    var search_left = selection_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   334
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   335
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   336
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   337
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   338
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   339
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   340
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   341
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   342
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   343
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   344
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   345
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   346
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   347
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   348
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   349
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   350
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   351
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   352
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   353
 * Affichage de la notification de sélection dans la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   354
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   355
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   356
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   357
Mosaic.prototype.mosaicSelection = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   358
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   359
    //Si on n'est pas en mode mosaic, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   360
    if(this.currentMode != 'MOSAIC')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   361
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   362
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   363
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   364
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   365
    //On spécifie la notification en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   366
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   367
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   368
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   369
    $('body').append(notification_selection);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   370
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   371
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   372
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   373
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   374
    var selection_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   375
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   376
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   377
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   378
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   379
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   380
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   381
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   382
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   383
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   384
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   385
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   386
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   387
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   388
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   389
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   390
 * Affichage de la notification de recherche dans une demande de filtrage de la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   391
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   392
 * pointers > fonction launchIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   393
 * zoomInteractions > fonction preUnzoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   394
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   395
Mosaic.prototype.filterSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   396
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   397
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   398
    if(this.currentMode != 'FILTER' || this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   399
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   400
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   401
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   402
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   403
    //On spécifie la notification en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   404
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   405
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   406
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   407
    $('body').append(notification_search);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   408
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   409
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   410
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   411
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   412
    var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   413
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   414
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   415
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   416
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   417
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   418
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   419
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   420
    //On la fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   421
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   422
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   423
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   424
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   425
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   426
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   427
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   428
 * Affichage de la notification de recherche & sélection dans une demande de filtrage de la mosaïque.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   429
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   430
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   431
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   432
Mosaic.prototype.filterSearchAndSelection = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   433
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   434
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   435
    if(this.currentMode != 'FILTER' || this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   436
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   437
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   438
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   439
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   440
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   441
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   442
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   443
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   444
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   445
    $('body').append(notification_selection + notification_search);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   446
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   447
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   448
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   449
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   450
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   451
    var selection_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   452
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   453
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   454
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   455
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   456
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   457
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   458
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   459
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   460
        left: search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   461
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   462
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   463
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   464
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   465
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   466
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   467
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   468
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   469
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   470
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   471
 * Affichage de la notification de résultat de gesture dans la mosaïque filtrée.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   472
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   473
 * zoomInteractions > fonction preUnzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   474
 * mosaic > onMouseUp et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   475
 * curvesDetector > updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   476
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   477
Mosaic.prototype.filterGesture = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   478
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   479
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   480
    if(this.currentMode != 'FILTER' || !this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   481
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   482
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   483
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   484
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   485
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   486
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   487
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   488
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   489
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   490
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   491
    $('body').append(notification_search_1gesture);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   492
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   493
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   494
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   495
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   496
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   497
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   498
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   499
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   500
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI' : '') + '/' + (this.gestureDelRequested ? 'hover' : 'valid') + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   501
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   502
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   503
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   504
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   505
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   506
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   507
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   508
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   509
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   510
        top: 0,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   511
        left: ($(window).width() - notify_width) / 2
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   512
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   513
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   514
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   515
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   516
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   517
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   518
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   519
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   520
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   521
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   522
 * Affichage de la notification de résultat de gesture & de sélection dans la mosaïque filtrée.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   523
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   524
 * zoomInteractions > fonction preZoom.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   525
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   526
Mosaic.prototype.filterGestureAndSelection = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   527
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   528
    //Si on n'est pas en mode filtrage ou qu'aucune recherche n'est affectée au filtrage, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   529
    if(this.currentMode != 'FILTER' || !this.filterSearchedType)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   530
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   531
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   532
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   533
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   534
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   535
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   536
    var notification_selection = "<div id='notify_selection' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   537
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   538
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   539
    $('body').append(notification_search_1gesture + notification_selection);
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   540
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   541
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   542
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   543
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   544
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   545
    var selection_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   546
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   547
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   548
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   549
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI' : '') + '/' + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   550
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   551
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   552
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   553
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   554
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   555
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   556
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   557
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   558
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   559
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   560
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   561
    $('#notify_selection').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   562
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   563
        left: selection_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   564
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   565
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   566
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   567
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   568
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   569
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   570
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   571
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   572
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   573
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   574
 * Affiche la notification de dezoom.
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   575
 * Direction vaut left ou right.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   576
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   577
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   578
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   579
Mosaic.prototype.videoSwipe = function(direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   580
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   581
    //Si on n'est pas en mode video ou qu'on n'est pas en train d'effectuer un swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   582
    if(this.currentMode != 'VIDEO' || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   583
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   584
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   585
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   586
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   587
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   588
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   589
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   590
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   591
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   592
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   593
    $('body').append(notification_swipe);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   594
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   595
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   596
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   597
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   598
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   599
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   600
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   601
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   602
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   603
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   604
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   605
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   606
        left: -notifyLeft + ($(window).width() - notify_width - notify_margin) / 2,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   607
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   608
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   609
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   610
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   611
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   612
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   613
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   614
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   615
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   616
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   617
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   618
 * Affichage de la notification de résultat de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   619
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   620
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   621
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   622
Mosaic.prototype.videoMove = function(targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   623
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   624
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   625
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   626
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   627
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   628
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   629
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   630
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   631
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   632
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   633
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   634
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   635
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   636
    $('body').append(notification_move);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   637
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   638
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   639
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   640
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   641
    var move_left = $(window).width() / 2 - (notify_width) / 2 + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   642
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   643
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   644
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   645
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   646
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   647
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   648
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   649
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   650
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   651
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   652
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   653
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   654
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   655
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   656
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   657
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   658
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   659
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   660
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   661
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   662
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   663
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   664
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   665
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   666
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   667
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   668
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   669
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   670
 * Affichage de la notification de résultat de move vers un voisin & de dézoom dans une vidéo.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   671
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   672
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   673
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   674
Mosaic.prototype.videoMoveAndUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   675
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   676
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   677
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   678
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   679
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   680
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   681
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   682
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   683
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   684
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   685
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   686
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   687
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   688
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   689
    $('body').append(notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   690
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   691
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   692
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   693
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   694
    var move_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   695
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   696
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   697
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   698
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   699
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   700
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   701
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   702
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   703
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   704
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   705
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   706
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   707
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   708
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   709
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   710
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   711
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   712
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   713
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   714
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   715
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   716
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   717
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   718
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   719
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   720
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   721
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   722
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   723
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   724
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   725
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   726
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   727
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   728
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   729
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   730
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   731
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   732
 * Affichage de la notification de résultat de dézoom dans une vidéo.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   733
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   734
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   735
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   736
Mosaic.prototype.videoUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   737
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   738
    //Si on n'est pas en mode video, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   739
    if(this.currentMode != 'VIDEO')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   740
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   741
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   742
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   743
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   744
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   745
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   746
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   747
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   748
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   749
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   750
    $('body').append(notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   751
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   752
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   753
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   754
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   755
    var unzoom_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   756
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   757
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   758
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   759
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   760
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   761
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   762
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   763
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   764
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   765
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   766
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   767
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   768
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   769
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   770
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   771
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   772
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   773
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   774
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   775
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   776
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   777
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   778
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   779
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   780
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   781
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   782
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   783
 * Affichage de la notification de timeline dans une vidéo/recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   784
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   785
 * pointers > fonction pointersTimelineSelection.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   786
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   787
Mosaic.prototype.timelineTimeline = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   788
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   789
    //Si on n'est pas en mode timeline, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   790
    if(this.currentMode != 'TIMELINE')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   791
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   792
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   793
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   794
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   795
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   796
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   797
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   798
    var notification_timeline = "<div id='notify_timeline' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   799
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   800
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   801
    $('body').append(notification_timeline);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   802
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   803
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   804
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   805
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   806
    var timeline_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   807
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   808
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   809
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   810
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   811
    $('#notify_timeline').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   812
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   813
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   814
        left: -notifyLeft + timeline_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   815
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   816
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   817
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   818
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   819
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   820
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   821
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   822
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   823
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   824
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   825
 * Affichage de la notification de recherche dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   826
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   827
 * neighbours > fonction deselectNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   828
 * pointers > fonction launchIdlePointers.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   829
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   830
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   831
Mosaic.prototype.searchSearch = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   832
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   833
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   834
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   835
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   836
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   837
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   838
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   839
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   840
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   841
    //On spécifie la notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   842
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   843
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   844
    //On l'ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   845
    $('body').append(notification_search);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   846
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   847
    //On calcule ses coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   848
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   849
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   850
    var search_left = $(window).width() / 2 - notify_width / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   851
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   852
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   853
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   854
    //On la positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   855
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   856
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   857
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   858
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   859
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   860
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   861
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   862
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   863
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   864
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   865
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   866
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   867
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   868
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   869
 * Affichage de la notification de recherche & de swipe dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   870
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   871
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   872
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   873
Mosaic.prototype.searchSearchAndSwipe = function(direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   874
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   875
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée ou qu'on n'est pas en train de faire un swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   876
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   877
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   878
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   879
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   880
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   881
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   882
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   883
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   884
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   885
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   886
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   887
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   888
    $('body').append(notification_search + notification_swipe);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   889
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   890
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   891
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   892
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   893
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   894
    var swipe_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   895
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   896
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   897
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   898
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   899
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   900
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   901
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   902
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   903
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   904
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   905
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   906
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   907
        left: -notifyLeft + swipe_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   908
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   909
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   910
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   911
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   912
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   913
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   914
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   915
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   916
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   917
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   918
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   919
 * Affichage de la notification de recherche, de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   920
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   921
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   922
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   923
Mosaic.prototype.searchSearchAndMove = function(targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   924
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   925
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   926
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   927
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   928
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   929
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   930
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   931
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   932
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   933
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   934
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   935
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   936
    $('body').append(notification_search + notification_move);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   937
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   938
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   939
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   940
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   941
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   942
    var move_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   943
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   944
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   945
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   946
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   947
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   948
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   949
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   950
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   951
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   952
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   953
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   954
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   955
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   956
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   957
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   958
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   959
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   960
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   961
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   962
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   963
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   964
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   965
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   966
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   967
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   968
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   969
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   970
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   971
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   972
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   973
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   974
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
   975
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   976
 * Affichage de la notification de recherche, de move vers un voisin & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   977
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   978
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   979
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   980
Mosaic.prototype.searchSearchAndMoveAndUnzoom = function(targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
   981
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   982
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   983
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   984
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   985
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   986
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   987
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   988
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   989
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   990
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   991
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   992
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   993
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   994
    $('body').append(notification_search + notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   995
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   996
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   997
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   998
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
   999
    var search_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1000
    var move_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1001
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1002
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1003
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1004
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1005
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1006
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1007
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1008
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1009
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1010
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1011
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1012
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1013
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1014
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1015
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1016
    $('#notify_search').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1017
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1018
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1019
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1020
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1021
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1022
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1023
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1024
        left: -notifyLeft + move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1025
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1026
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1027
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1028
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1029
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1030
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1031
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1032
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1033
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1034
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1035
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1036
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1037
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1038
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1039
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1040
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1041
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1042
 * Affichage de la notification de recherche & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1043
 * Est appelé dans le fichier :
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1044
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1045
Mosaic.prototype.searchSearchAndUnzoom = function()
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1046
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1047
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est effectuée, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1048
    if(this.currentMode != 'SEARCH' || this.isCurrentlyInASearchByGesture)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1049
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1050
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1051
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1052
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1053
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1054
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1055
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1056
    var notification_search = "<div id='notify_search' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1057
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1058
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1059
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1060
    $('body').append(notification_search + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1061
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1062
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1063
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1064
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1065
    var search_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1066
    var unzoom_left = search_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1067
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1068
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1069
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1070
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1071
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1072
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1073
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1074
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1075
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1076
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1077
    var notifyTop = 0, notifyLeft = 0;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1078
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1079
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1080
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1081
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1082
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1083
        left: -notifyLeft + search_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1084
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1085
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1086
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1087
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1088
        top: -notifyTop,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1089
        left: -notifyLeft + unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1090
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1091
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1092
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1093
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1094
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1095
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1096
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1097
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1098
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1099
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1100
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1101
 * Affichage de la notification de résultat dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1102
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1103
 * neighbours > fonctions deselectNeighbour et moveToNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1104
 * playerControl > fonction exitTimeline.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1105
 * zoomInteractions > fonction zoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1106
 * mosaic > fonctions onMouseUp et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1107
 * curvesDetector > fonction updateDists.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1108
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1109
Mosaic.prototype.searchGesture = function(gestureName, mode)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1110
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1111
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1112
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1113
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1114
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1115
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1116
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1117
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1118
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1119
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1120
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1121
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1122
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1123
    $('body').append(notification_search_1gesture);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1124
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1125
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1126
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1127
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1128
    var point_left = $(window).width() / 2 - (notify_width) / 2 - notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1129
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1130
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1131
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1132
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1133
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1134
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1135
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1136
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1137
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1138
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1139
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1140
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1141
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1142
        top: 0,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1143
        left: ($(window).width() - notify_width) / 2
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1144
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1145
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1146
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1147
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1148
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1149
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1150
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1151
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1152
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1153
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1154
 * Affichage de la notification de résultat & de swipe dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1155
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1156
 * mosaic > fonction manageControlEvents.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1157
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1158
Mosaic.prototype.searchGestureAndSwipe = function(gestureName, mode, direction)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1159
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1160
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue ou on ne fait pas de swipe, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1161
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '' || !this.isSwipe)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1162
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1163
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1164
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1165
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1166
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1167
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1168
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1169
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1170
    var notification_swipe = "<div id='notify_swipe' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1171
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1172
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1173
    $('body').append(notification_search_1gesture + notification_swipe);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1174
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1175
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1176
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1177
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1178
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1179
    var swipe_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1180
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1181
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1182
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1183
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1184
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1185
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1186
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1187
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1188
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1189
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1190
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1191
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1192
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1193
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1194
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1195
    $('#notify_swipe').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1196
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1197
        left: swipe_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1198
        'background-image': 'url(./pictos/notifications/swipe_' + direction + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1199
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1200
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1201
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1202
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1203
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1204
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1205
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1206
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1207
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1208
/*
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1209
 * Affichage de la notification de résultat, de move vers un voisin.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1210
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1211
 * neighbours > fonction selectNeighbour.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1212
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1213
Mosaic.prototype.searchGestureAndMove = function(gestureName, mode, targetId)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1214
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1215
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1216
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1217
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1218
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1219
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1220
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1221
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1222
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1223
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1224
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1225
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1226
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1227
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1228
    $('body').append(notification_search_1gesture + notification_move);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1229
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1230
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1231
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1232
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1233
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1234
    var move_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1235
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1236
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1237
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1238
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1239
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1240
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1241
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1242
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1243
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1244
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1245
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1246
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1247
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1248
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1249
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1250
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1251
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1252
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1253
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1254
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1255
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1256
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1257
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1258
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1259
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1260
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1261
        left: move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1262
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1263
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1264
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1265
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1266
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1267
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1268
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1269
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1270
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1271
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1272
/*
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1273
 * Affichage de la notification de résultat, de move vers un voisin & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1274
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1275
 * neighbours > fonction selectNeighbour.
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1276
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1277
Mosaic.prototype.searchGestureAndMoveAndUnzoom = function(gestureName, mode, targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1278
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1279
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1280
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1281
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1282
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1283
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1284
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1285
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1286
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1287
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1288
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1289
    var notification_move = "<div id='notify_move' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1290
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1291
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1292
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1293
    $('body').append(notification_search_1gesture + notification_move + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1294
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1295
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1296
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1297
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1298
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 3 + notify_margin * 4) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1299
    var move_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1300
    var unzoom_left = move_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1301
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1302
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1303
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1304
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1305
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1306
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1307
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1308
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1309
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1310
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1311
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1312
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1313
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1314
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1315
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1316
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1317
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1318
    var sides = ['left', 'right', 'up', 'down'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1319
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1320
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1321
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1322
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1323
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1324
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1325
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1326
    $('#notify_move').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1327
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1328
        left: move_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1329
        'background-image': 'url(./pictos/notifications/move_' + sides[side] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1330
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1331
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1332
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1333
        left: unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1334
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1335
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1336
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1337
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1338
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1339
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1340
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1341
    });
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1342
}
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1343
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1344
/*
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1345
 * Affichage de la notification de résultat & de dézoom dans une vidéo de recherche.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1346
 * Est appelé dans le fichier :
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1347
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1348
Mosaic.prototype.searchGestureAndUnzoom = function(gestureName, mode, targetId)
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1349
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1350
    //Si on n'est pas en mode recherche dans une video ou qu'aucune recherche n'est reconnue, on part.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1351
    if(this.currentMode != 'SEARCH' || this.currentSearchGesture[this.centerId] == '')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1352
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1353
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1354
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1355
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1356
    var _this = this;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1357
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1358
    //On spécifie les notifications en div.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1359
    var notification_search_1gesture = "<div id='notify_search_1gesture' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1360
    var notification_unzoom = "<div id='notify_unzoom' class='notifications'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1361
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1362
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1363
    $('body').append(notification_search_1gesture + notification_unzoom);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1364
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1365
    //On calcule leurs coordonnées et dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1366
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1367
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1368
    var search_1gesture_left = $(window).width() / 2 - (notify_width * 2 + notify_margin * 3) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1369
    var unzoom_left = search_1gesture_left + notify_width + notify_margin;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1370
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1371
    if(_.include(this.gestures, gestureName))
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1372
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1373
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + mode + '/' + gestureName + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1374
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1375
    else if(mode == 'none')
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1376
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1377
        $('#notify_search_1gesture').css('background-image', 'url("./pictos/big/normal/inconnu.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1378
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1379
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1380
    var side = $.inArray(parseInt(targetId), this.neighboursIds);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1381
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1382
    if(side == -1)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1383
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1384
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1385
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1386
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1387
    var unzooms = ['horizontal', 'vertical'];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1388
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1389
    //On les positionne.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1390
    $('#notify_search_1gesture').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1391
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1392
        left: search_1gesture_left
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1393
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1394
    $('#notify_unzoom').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1395
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1396
        left: unzoom_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1397
        'background-image': 'url(./pictos/notifications/unzoom_' + unzooms[Math.floor(side / 2)] + '.png)'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1398
    });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1399
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1400
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1401
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1402
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1403
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1404
    });
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1405
}
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1406
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1407
/*
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1408
 * Affichage des notifications de gestures trouvées dans une recherche par courbes.
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1409
 * Est appelé dans le fichier :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1410
 * curvesDetector > fonction updateDists.
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1411
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1412
Mosaic.prototype.curvesGestures = function(gestures)
45
0e29ae4568a0 Front IDILL:
bastiena
parents: 44
diff changeset
  1413
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1414
    //S'il n'y a pas de gestures à afficher.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1415
    if(gestures.length == 0)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1416
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1417
        //On ajoute une seule notification.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1418
        var notification_curves = "<div class='notifications' id='notify_curves'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1419
        $('body').append(notification_curves);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1420
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1421
        //On calcule leurs dimensions et coordonnées.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1422
        var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1423
        var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1424
        var curves_left = $(window).width() / 2 - (notify_width + notify_margin * 2) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1425
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1426
        $('#notify_curves').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1427
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1428
            left: curves_left,
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1429
            'background-image': 'url("./pictos/big/normal/inconnu.png")',
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1430
            opacity: '0.9'
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1431
        });
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1432
        return;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1433
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1434
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1435
    //Sinon, on les met dans un tableau.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1436
    var gestures_tab = gestures.split(';');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1437
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1438
    var notifications_curves_gestures = '';
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1439
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1440
    //On crée autant de notifications qu'il y a de gestures.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1441
    for(var i = 0 ; i < gestures_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1442
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1443
        notifications_curves_gestures += "<div class='notifications' id='notify_curves_" + gestures_tab[i] + "'></div>";
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1444
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1445
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1446
    //On les ajoute à la mosaïque.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1447
    $('body').append(notifications_curves_gestures);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1448
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1449
    //On calcule leurs dimensions.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1450
    var notify_width = $('.notifications').width(), notify_height = $('.notifications').height();
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1451
    var notify_margin = parseInt($('.notifications').css('margin'));
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1452
    var curves_gestures_left = [];
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1453
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1454
    //On calcule leurs dimensions et leur backgrounds.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1455
    curves_gestures_left[0] = $(window).width() / 2 - (notify_width * (gestures_tab.length) + notify_margin * (gestures_tab.length + 2)) / 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1456
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1457
    for(var i = 0 ; i < gestures_tab.length ; i++)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1458
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1459
        //On va chercher leurs backgrounds.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1460
        $('#notify_curves_' + gestures_tab[i]).css('background-image', 'url("./pictos/big/' + (this.config.mouseInteractions ? 'MI/' : '') + 'normal/' + gestures_tab[i] + '.png")');
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1461
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1462
        //On calcule leurs coordonnées.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1463
        if(i+1 < gestures_tab.length)
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1464
        {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1465
            curves_gestures_left[i+1] = curves_gestures_left[i] + notify_width + notify_margin * 2;
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1466
        }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1467
        
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1468
        //On les place.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1469
        $('#notify_curves_' + gestures_tab[i]).css('left', curves_gestures_left[i]);
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1470
    }
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1471
    
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1472
    //On les fait apparaître.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1473
    $('.notifications').css(
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1474
    {
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1475
        opacity: "0.9"
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1476
    });
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1477
}
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1478
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1479
/*
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1480
 * Efface les notifications. Précède chaque notification.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1481
 * Est appelé dans les fichiers :
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1482
 * neighbours > fonctions listenToNeighbours, selectNeighbour, deselectNeighbour et moveToNeighbour.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1483
 * notifications > fonction notifyHelp.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1484
 * playerControl > fonction exitTimeline.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1485
 * pointers > fonctions pointersTimelineSelection, launchIdlePointers et removeSearchNotificationIfOnIt.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1486
 * search > fonction removeFilter.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1487
 * zoomInteractions > fonctions preZoom, preUnzoom, zoom et unzoom.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1488
 * mosaic > fonctions onMouseUp, showNImages et manageControlEvents.
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1489
 * curvesDetector > fonction updateDists.
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1490
*/
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1491
Mosaic.prototype.removeNotifications = function()
47
4e1ee94d70b1 Front IDILL:
bastiena
parents: 46
diff changeset
  1492
{
52
277c94533395 Front IDILL :
bastiena
parents: 47
diff changeset
  1493
    $('.notifications').remove();
44
8393d3473b98 Front IDILL:
bastiena
parents:
diff changeset
  1494
}