src/js/widgets/arrowWidget.js
branchpopcorn-port
changeset 535 7c25af985344
parent 337 ee1d1e4fcf45
child 560 68e91efc5a58
equal deleted inserted replaced
534:0e6477a03ca9 535:7c25af985344
    43 
    43 
    44     /* don't move out of the screen */
    44     /* don't move out of the screen */
    45     if (corrected_percents <= 0)
    45     if (corrected_percents <= 0)
    46       corrected_percents = 0;
    46       corrected_percents = 0;
    47 
    47 
       
    48     if (corrected_percents <= 5) {
       
    49       var left_edge_img_templ = IriSP.templToHTML("url('{{img_dir}}/left_edge_arrow.png')"); 
       
    50       this.selector.children(".Ldt-arrowWidget").css("background-image", left_edge_img_templ); 
       
    51     } else if (corrected_percents >= 95) {
       
    52       var right_edge_img_templ = IriSP.templToHTML("url('{{img_dir}}/right_edge_arrow.png')"); 
       
    53       this.selector.children(".Ldt-arrowWidget").css("background-image", right_edge_img_templ);
       
    54     } else {
       
    55       var img_templ = IriSP.templToHTML("url('{{img_dir}}/arrow.png')"); 
       
    56       this.selector.children(".Ldt-arrowWidget").css("background-image", img_templ);
       
    57     }
       
    58     
    48     this.selector.children(".Ldt-arrowWidget").animate({"left" : corrected_percents + "%"});
    59     this.selector.children(".Ldt-arrowWidget").animate({"left" : corrected_percents + "%"});
    49 
    60 
    50     this._oldAnnotation = currentAnnotation;
    61     this._oldAnnotation = currentAnnotation;
    51   }
    62   }
    52 }
    63 }