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 ?

It looks like a bug, that should not be the case.  I believe the same rulerStyle (this._rulerStyle) is used to create both rulers and OverviewRuler is altering that object instead of making a copy.


From: John J Barton <johnjbarton@xxxxxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 08/18/2011 02:37 PM
Subject: Re: [orion-dev] Why is ruler offset by lineHeight ?
Sent by: orion-dev-bounces@xxxxxxxxxxx

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.

orion-dev mailing list

Back to the top