Critical bug fix in ticks.js

Under certain circumstances there was an infinite loop in tick creation, e.g. firefox on windows. This infinite loop came from the recent reintroduction of calcStraight.