equal
deleted
inserted
replaced
38 // it's half the length of the arrow (27 / 2). We need to convert |
38 // it's half the length of the arrow (27 / 2). We need to convert |
39 // it in percents though. |
39 // it in percents though. |
40 var totalWidth = this.selector.width(); |
40 var totalWidth = this.selector.width(); |
41 var correction = ((27 / 2) / totalWidth) * 100; |
41 var correction = ((27 / 2) / totalWidth) * 100; |
42 var corrected_percents = percents - correction; |
42 var corrected_percents = percents - correction; |
|
43 |
|
44 /* don't move out of the screen */ |
|
45 if (corrected_percents <= 0) |
|
46 corrected_percents = 0; |
|
47 |
43 this.selector.children(".Ldt-arrowWidget").animate({"left" : corrected_percents + "%"}); |
48 this.selector.children(".Ldt-arrowWidget").animate({"left" : corrected_percents + "%"}); |
44 |
49 |
45 this._oldAnnotation = currentAnnotation; |
50 this._oldAnnotation = currentAnnotation; |
46 } |
51 } |
47 } |
52 } |