updated on resize event handling
bug fix, now looping forward instead of reverse to draw ruler marks