Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Why is ruler offset by lineHeight ?



On Thu, Aug 18, 2011 at 10:59 AM, John J Barton <johnjbarton@xxxxxxxxxxxxxxx> wrote:


On Thu, Aug 18, 2011 at 10:48 AM, Silenio Quarti <Silenio_Quarti@xxxxxxxxxx> wrote:

Every ruler div has one extra div at the top (firstChild before any lines). This div is used to determine the width of the ruler. Its height is "lineHeight".  The ruler is offset by "lineHeight" to hide this div above the editor. 

Ok, thanks, that's fine, I can just add +1 to the line to move my annotation down. Now how can I control the width of that div?  

If I understand the design correctly, the UI has, from left to right, annotationRuler, lineRuler, (client and overlay), overViewRuler.
The overViewRuler width seems to control the annotationRuler width. That is if I set style.width = "140px"; in to OverviewRuler.prototype.getStyle in the lineIndex === undefined, then both rulers are 140px wide.

jjb

Back to the top