()
| 28 | var axis = self.orientation == "horizontal" ? "pageX" : "pageY"; |
| 29 | var start = e[axis], startpos = self.pos; |
| 30 | function done() { |
| 31 | CodeMirror.off(document, "mousemove", move); |
| 32 | CodeMirror.off(document, "mouseup", done); |
| 33 | } |
| 34 | function move(e) { |
| 35 | if (e.which != 1) return done(); |
| 36 | self.moveTo(startpos + (e[axis] - start) * (self.total / self.size)); |