MrFrankel / ruler

HTML5 Canvas ruler for authoring tools
http://mrfrankel.github.io/ruler/
221 stars 56 forks source link

guide lines tool tip errors #15

Open julientype opened 4 years ago

julientype commented 4 years ago

i keep the ruler floating at the edge as i scroll base on doc size...... posx and y are changed yet the guide lines tip show up wrong... in your css i use 20px not 50% for tool tip it then showup next to the foating ruler top or left....

everything else looks ok..... a simple fix at my end in your ruler.js file did the trick....

your canvas are too big they should be drawn as 2 different object.... like ruler width = 1000 * 4 is a big array for 1000px then you rotate the ruler with second large array with a big- left array...... the canvas should only be what it needs in width and height to speed up rendering..... 2 different draw methods are needed to skip the 90degree rotate

grate job.....