Looking to adjust the size of a ruler?
In horizontal mode, the ruler expands and contracts as you resize it.
However, in vertical mode, the ruler shifts left as you shrink it and right as you expand it.
You can resize the ruler by dragging the small red line.
Check out the code on jsFiddle.
Snippet from the source:
ruler.css({
width: e.pageY -ruler.offset().top
});
Full source code:
$.event.add( document, "mousemove", function(e){
e.stopPropagation(e);
if(ruler_resize_active) {
console.log(".ruler-resize:mousemove");
console.log(ruler.offset().left);
console.log(ruler.offset().top);
if(options.orientation == "vertical") {
ruler.css({
width: e.pageY - ruler.offset().top
});
}
}
});