update afficherèrecap
This commit is contained in:
parent
65c376d95c
commit
c3ff1b957f
|
@ -255,8 +255,8 @@ function setUp_3D(idx_mesh, idx_i_init, idx_j_init, explication=false){
|
||||||
choix_courant['delta_init'] = delta_init
|
choix_courant['delta_init'] = delta_init
|
||||||
|
|
||||||
// pour savoir quel mesh on affiche
|
// pour savoir quel mesh on affiche
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('affichage_mesh_IJ', [mesh_courant, idx_i_init, idx_j_init])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('affichage_mesh_IJ', [num_tache, nb_choix_fait, mesh_courant, idx_i_init, idx_j_init])})
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('affichage_mesh_TD', [mesh_courant, theta_init, delta_init])})//"Affichage Mesh random : "+mesh_courant+" en theta, delta : ("+theta_init+", "+delta_init+")"})
|
interactions.push({"time": new Date().getTime(), "type": get_message('affichage_mesh_TD', [num_tache, nb_choix_fait, mesh_courant, theta_init, delta_init])})//"Affichage Mesh random : "+mesh_courant+" en theta, delta : ("+theta_init+", "+delta_init+")"})
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|
|
@ -138,6 +138,8 @@ function afficher_recap(){
|
||||||
swapElements(canvasMins, i, i-1)
|
swapElements(canvasMins, i, i-1)
|
||||||
swapElements(ctxMins, i, i-1)
|
swapElements(ctxMins, i, i-1)
|
||||||
swapElements(liste_poses, i, i-1)
|
swapElements(liste_poses, i, i-1)
|
||||||
|
liste_poses[i-1][0] = 'choix'+(i)
|
||||||
|
liste_poses[i][0] = 'choix'+(i+1)
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('switch_haut_i', [num_tache, nb_choix_fait, i])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('switch_haut_i', [num_tache, nb_choix_fait, i])})
|
||||||
clicked = false
|
clicked = false
|
||||||
}
|
}
|
||||||
|
@ -150,6 +152,8 @@ function afficher_recap(){
|
||||||
swapElements(canvasMins, i, i+1)
|
swapElements(canvasMins, i, i+1)
|
||||||
swapElements(ctxMins, i, i+1)
|
swapElements(ctxMins, i, i+1)
|
||||||
swapElements(liste_poses, i, i+1)
|
swapElements(liste_poses, i, i+1)
|
||||||
|
liste_poses[i][0] = 'choix'+(i+1)
|
||||||
|
liste_poses[i+1][0] = 'choix'+(i+2)
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('switch_bas_i', [num_tache, nb_choix_fait, i])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('switch_bas_i', [num_tache, nb_choix_fait, i])})
|
||||||
clicked = false
|
clicked = false
|
||||||
}
|
}
|
||||||
|
@ -162,12 +166,15 @@ function afficher_recap(){
|
||||||
if (clicked && click_inside(xyMouseDown, x_croix, y_croix, w_croix, h_croix)) {
|
if (clicked && click_inside(xyMouseDown, x_croix, y_croix, w_croix, h_croix)) {
|
||||||
liste_poses.splice(i, 1)
|
liste_poses.splice(i, 1)
|
||||||
nb_choix_fait = nb_choix_fait-1
|
nb_choix_fait = nb_choix_fait-1
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('supp_pose_i', [i])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('supp_pose_i', [num_tache, nb_choix_fait,i])})
|
||||||
ctxMins[i].clearRect(0, 0, canvasMins[i].width, canvasMins[i].height)
|
ctxMins[i].clearRect(0, 0, canvasMins[i].width, canvasMins[i].height)
|
||||||
for (let j = i; j < nb_choix_demande-1; j++) {
|
for (let j = i; j < nb_choix_demande-1; j++) {
|
||||||
swapElements(canvasMins, j, j+1)
|
swapElements(canvasMins, j, j+1)
|
||||||
swapElements(ctxMins, j, j+1)
|
swapElements(ctxMins, j, j+1)
|
||||||
}
|
}
|
||||||
|
for (let j = i; j < liste_poses.length; j++) {
|
||||||
|
liste_poses[j][0] = 'choix'+(j+1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,7 +283,7 @@ function action_fleche_haut(){
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('FH', [num_tache, nb_choix_fait, idx_i, idx_j])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('FH', [num_tache, nb_choix_fait, idx_i, idx_j])})
|
||||||
if (idx_j == 0){
|
if (idx_j == 0){
|
||||||
texte_temporaire = {"text": "You can't go any further, GO BACK DOWN.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "You can't go any further, GO BACK DOWN.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_FH", []) })
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_FH", [num_tache, nb_choix_fait]) })
|
||||||
}
|
}
|
||||||
idx_j = Math.max(idx_j-1,0)
|
idx_j = Math.max(idx_j-1,0)
|
||||||
}
|
}
|
||||||
|
@ -284,7 +291,7 @@ function action_fleche_bas(){
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message('FB', [num_tache, nb_choix_fait, idx_i, idx_j])})
|
interactions.push({"time": new Date().getTime(), "type": get_message('FB', [num_tache, nb_choix_fait, idx_i, idx_j])})
|
||||||
if (idx_j == 4){
|
if (idx_j == 4){
|
||||||
texte_temporaire = {"text": "You can't go any further, GO UP.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "You can't go any further, GO UP.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_FB", []) })
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_FB", [num_tache, nb_choix_fait]) })
|
||||||
}
|
}
|
||||||
idx_j = Math.min(idx_j+1,4)
|
idx_j = Math.min(idx_j+1,4)
|
||||||
}
|
}
|
||||||
|
@ -368,21 +375,21 @@ function action_bouton_pose(){
|
||||||
if (deja_choisie && !(nb_choix_fait == nb_choix_demande)){
|
if (deja_choisie && !(nb_choix_fait == nb_choix_demande)){
|
||||||
//console.log("Cette pose a déjà été sélectionnée.")
|
//console.log("Cette pose a déjà été sélectionnée.")
|
||||||
texte_temporaire = {"text": "This viewpoint has already been selected.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "This viewpoint has already been selected.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_pose_selectionnee", [])})}
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_pose_selectionnee", [num_tache, nb_choix_fait])})}
|
||||||
|
|
||||||
// plus de choix possible
|
// plus de choix possible
|
||||||
if (nb_choix_fait == nb_choix_demande) {
|
if (nb_choix_fait == nb_choix_demande) {
|
||||||
//console.log("Tu as déjà fait tes "+nb_choix_demande+" choix.")
|
//console.log("Tu as déjà fait tes "+nb_choix_demande+" choix.")
|
||||||
texte_temporaire = {"text": "You have already selected your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "You have already selected your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_choix_fait", [nb_choix_fait])})}
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_choix_fait", [num_tache, nb_choix_fait, nb_choix_fait])})}
|
||||||
|
|
||||||
// si on a pas encore choisie toutes nos poses, on peut en ajouter
|
// si on a pas encore choisie toutes nos poses, on peut en ajouter
|
||||||
if (nb_choix_fait < nb_choix_demande && !(deja_choisie)){
|
if (nb_choix_fait < nb_choix_demande && !(deja_choisie)){
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("bouton_select", [num_tache, nb_choix_fait, nb_choix_fait, idx_i, idx_j])})
|
|
||||||
liste_poses.push(['choix'+(nb_choix_fait+1), {'theta':theta}, {"delta":delta}, {'idx_i':idx_i}, {'idx_j':idx_j}])
|
liste_poses.push(['choix'+(nb_choix_fait+1), {'theta':theta}, {"delta":delta}, {'idx_i':idx_i}, {'idx_j':idx_j}])
|
||||||
// affichage de la vue sélectionnée dans le recap
|
// affichage de la vue sélectionnée dans le recap
|
||||||
ctxMins[nb_choix_fait].drawImage(canvasRenderer, 0.5*canvasRenderer.width-0.5*canvasRenderer.height, 0, canvasRenderer.height, canvasRenderer.height, 0, 0, canvasMins[0].width, canvasMins[0].height)//canvasRenderer.height*0.3, canvasRenderer.height*0.25)
|
ctxMins[nb_choix_fait].drawImage(canvasRenderer, 0.5*canvasRenderer.width-0.5*canvasRenderer.height, 0, canvasRenderer.height, canvasRenderer.height, 0, 0, canvasMins[0].width, canvasMins[0].height)//canvasRenderer.height*0.3, canvasRenderer.height*0.25)
|
||||||
nb_choix_fait = nb_choix_fait+1
|
nb_choix_fait = nb_choix_fait+1
|
||||||
|
interactions.push({"time": new Date().getTime(), "type": get_message("bouton_select", [num_tache, nb_choix_fait, nb_choix_fait, idx_i, idx_j])})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,7 +409,7 @@ function action_bouton_retirer(){
|
||||||
else {
|
else {
|
||||||
//console.log("Il n'y a pas de pose à retirer.")
|
//console.log("Il n'y a pas de pose à retirer.")
|
||||||
texte_temporaire = {"text": "There are no selected viewpoints to remove.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "There are no selected viewpoints to remove.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_pas_de_pose", [])})
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_pas_de_pose", [num_tache, nb_choix_fait])})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +425,7 @@ function action_bouton_reinitialiser(){
|
||||||
}
|
}
|
||||||
else {//console.log("Il n'y a pas de pose à reintialiser.")
|
else {//console.log("Il n'y a pas de pose à reintialiser.")
|
||||||
texte_temporaire = {"text": "There are no selected viewpoints to resart.", "x":x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "There are no selected viewpoints to resart.", "x":x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_reset_impossible", [])})}
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_reset_impossible", [num_tache, nb_choix_fait])})}
|
||||||
}
|
}
|
||||||
|
|
||||||
function action_bouton_valider(){
|
function action_bouton_valider(){
|
||||||
|
@ -467,7 +474,7 @@ function action_bouton_valider(){
|
||||||
else if (nb_choix_fait < nb_choix_demande){
|
else if (nb_choix_fait < nb_choix_demande){
|
||||||
//console.log("Tu n'as pas fait tes 3 choix")
|
//console.log("Tu n'as pas fait tes 3 choix")
|
||||||
texte_temporaire = {"text": "You did not select your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
texte_temporaire = {"text": "You did not select your "+nb_choix_demande+" viewpoints.", "x": x_pop_up, "y": y_pop_up, "t_end": new Date().getTime()+temps_pop}
|
||||||
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_valider", [])})
|
interactions.push({"time": new Date().getTime(), "type": get_message("erreur_valider", [num_tache, nb_choix_fait])})
|
||||||
}
|
}
|
||||||
// Error : un pbl à identifier
|
// Error : un pbl à identifier
|
||||||
else{
|
else{
|
||||||
|
|
|
@ -14,22 +14,22 @@ function get_message(message_nom, arguments){
|
||||||
interaction_messages['fin_tache_i'] = "fin tache n°"+(arguments[0])
|
interaction_messages['fin_tache_i'] = "fin tache n°"+(arguments[0])
|
||||||
interaction_messages['fin_choix'] = "fin choix vues - debut explication analyse"
|
interaction_messages['fin_choix'] = "fin choix vues - debut explication analyse"
|
||||||
|
|
||||||
interaction_messages['affichage_mesh_IJ'] = "Affichage Mesh random : "+arguments[0]+" en idx_i, idx_j : ("+arguments[1]+", "+arguments[2]+")"
|
interaction_messages['affichage_mesh_IJ'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage Mesh random : "+arguments[2]+" en idx_i, idx_j : ("+arguments[3]+", "+arguments[4]+")"
|
||||||
interaction_messages['affichage_mesh_TD'] = "Affichage Mesh random : "+arguments[0]+" en theta, delta : ("+arguments[1]+", "+arguments[2]+")"
|
interaction_messages['affichage_mesh_TD'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage Mesh random : "+arguments[2]+" en theta, delta : ("+arguments[3]+", "+arguments[4]+")"
|
||||||
|
|
||||||
interaction_messages['FG'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche gauche ("+arguments[2]+", "+arguments[3]+')'
|
interaction_messages['FG'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche gauche ("+arguments[2]+", "+arguments[3]+')'
|
||||||
interaction_messages['FD'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche droite ("+arguments[2]+", "+arguments[3]+')'
|
interaction_messages['FD'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche droite ("+arguments[2]+", "+arguments[3]+')'
|
||||||
interaction_messages['FH'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche haut ("+arguments[2]+", "+arguments[3]+')'
|
interaction_messages['FH'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche haut ("+arguments[2]+", "+arguments[3]+')'
|
||||||
interaction_messages['FB'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche bas ("+arguments[2]+", "+arguments[3]+')'
|
interaction_messages['FB'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche bas ("+arguments[2]+", "+arguments[3]+')'
|
||||||
|
|
||||||
interaction_messages['erreur_FH'] = "Affichage error a cause de fleche haut"
|
interaction_messages['erreur_FH'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error a cause de fleche haut"
|
||||||
interaction_messages['erreur_FB'] = "Affichage error a cause de fleche bas"
|
interaction_messages['erreur_FB'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error a cause de fleche bas"
|
||||||
|
|
||||||
interaction_messages['switch_haut_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche switch haut de la pose n°"+(arguments[2]+1)
|
interaction_messages['switch_haut_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche switch haut de la pose n°"+(arguments[2]+1)
|
||||||
interaction_messages['switch_bas_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche switch bas de la pose n°"+(arguments[2]+1)
|
interaction_messages['switch_bas_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" fleche switch bas de la pose n°"+(arguments[2]+1)
|
||||||
interaction_messages['supp_pose_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" suppression de la pose n°"+(arguments[2]+1)
|
interaction_messages['supp_pose_i'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" suppression de la pose n°"+(arguments[2]+1)
|
||||||
|
|
||||||
interaction_messages['bouton_select'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" choix n°"+(arguments[2]+1)+" bouton pose :("+arguments[3]+", "+arguments[4]+")"
|
interaction_messages['bouton_select'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" choix n°"+(arguments[2])+" bouton pose :("+arguments[3]+", "+arguments[4]+")"
|
||||||
interaction_messages['bouton_remove'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton retirer"
|
interaction_messages['bouton_remove'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton retirer"
|
||||||
interaction_messages['bouton_reset'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton reinitialiser"
|
interaction_messages['bouton_reset'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton reinitialiser"
|
||||||
interaction_messages['bouton_valider'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton valider"
|
interaction_messages['bouton_valider'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton valider"
|
||||||
|
@ -37,11 +37,11 @@ function get_message(message_nom, arguments){
|
||||||
interaction_messages['bouton_raz_check'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton raz check"
|
interaction_messages['bouton_raz_check'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton raz check"
|
||||||
interaction_messages['bouton_raz_croix'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton raz croix"
|
interaction_messages['bouton_raz_croix'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" bouton raz croix"
|
||||||
|
|
||||||
interaction_messages['erreur_reset_impossible'] = "Affichage error aucun choix fait donc pas de reinitialisation possible"
|
interaction_messages['erreur_reset_impossible'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error aucun choix fait donc pas de reinitialisation possible"
|
||||||
interaction_messages['erreur_pas_de_pose'] = "Affichage error pas de pose a retirer"
|
interaction_messages['erreur_pas_de_pose'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error pas de pose a retirer"
|
||||||
interaction_messages['erreur_choix_fait'] = "Affichage error "+arguments[0]+" deja fait"
|
interaction_messages['erreur_choix_fait'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error "+arguments[2]+" deja fait"
|
||||||
interaction_messages['erreur_pose_selectionnee'] = "Affichage error pose deja sélectionnee"
|
interaction_messages['erreur_pose_selectionnee'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error pose deja sélectionnee"
|
||||||
interaction_messages['erreur_valider'] = "Affichage error a cause du bouton valider"
|
interaction_messages['erreur_valider'] = "T"+arguments[0]+" Ch_fait"+arguments[1]+" Affichage error a cause du bouton valider"
|
||||||
|
|
||||||
interaction_messages['fin_explication_analyse'] = "fin explication analyse - debut analyse"
|
interaction_messages['fin_explication_analyse'] = "fin explication analyse - debut analyse"
|
||||||
interaction_messages['debut_analyse'] = "debut analyse n°1"
|
interaction_messages['debut_analyse'] = "debut analyse n°1"
|
||||||
|
|
Loading…
Reference in New Issue