equal
deleted
inserted
replaced
40 return; |
40 return; |
41 let [size, maxh, range, pixels, units] = this.get_ratios(); |
41 let [size, maxh, range, pixels, units] = this.get_ratios(); |
42 |
42 |
43 let new_y = this.range_elt.y.baseVal.value + Math.round(Math.min(this.position,range) * pixels / units); |
43 let new_y = this.range_elt.y.baseVal.value + Math.round(Math.min(this.position,range) * pixels / units); |
44 let new_height = Math.round(maxh * size/range); |
44 let new_height = Math.round(maxh * size/range); |
45 console.log(new_y, new_height); |
|
46 |
45 |
47 this.cursor_elt.y.baseVal.value = new_y; |
46 this.cursor_elt.y.baseVal.value = new_y; |
48 this.cursor_elt.height.baseVal.value = new_height; |
47 this.cursor_elt.height.baseVal.value = new_height; |
49 } |
48 } |
50 |
49 |