Modify

Opened 11 months ago

Last modified 11 months ago

#24103 new task

Irritations with text-anchor-horizontal and text-anchor-vertical in the documentation ("MapCSS Implementation")

Reported by: goodidea Owned by: team
Priority: normal Milestone:
Component: Wiki content Version:
Keywords: text-anchor-horizontal text-anchor-vertical Cc:

Description

What confuses me about the MapCSS documentation for text-anchor-horizontal and text-anchor-vertical:

  1. Do these two style keys only affect text of nodes? (It seems that if an icon is present at a node, it refers to the text position in relation to the icon). With a way styling, these two style keys seem to have absolutely no effect. I haven't tested how it is with areas, but it is probably equivalent to a node (if an icon is displayed in an area, for example, or even without an icon; for text-position: center).
  2. The default value in the table for text-anchor-horizontal is right - but that is not correct - it is apparently center.
  3. The default value in the table for text-anchor-vertical is bottom - but that is not correct - it is apparently below.

Shouldn't the defaults be corrected and shouldn't described more clearly what is affected by these 2 style keys (and what not)?

I have attached a screenshot that visualizes the values ​​of text-anchor-vertical ...

Attachments (1)

text-anchor-vertical.png (31.4 KB ) - added by goodidea 11 months ago.
A screenshot visualizing the values ​​of text-anchor-vertical

Download all attachments as: .zip

Change History (3)

by goodidea, 11 months ago

Attachment: text-anchor-vertical.png added

A screenshot visualizing the values ​​of text-anchor-vertical

comment:1 by stoecker, 11 months ago

Hmm, regarding point 2 and 3: According to trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java#L220 the defaults are right and bottom.

comment:2 by goodidea, 11 months ago

OK ... then I got really confused. I checked again now and I had activated another styling that changed these strange defaults to text-anchor-horizontal: center; and text-anchor-vertical: below;(for all nodes). Very strange defaults: why should text be on the right side of an icon and on the bottom edge of an icon (at a node)?

But then it is what it is – but perhaps the description could be improved, then which elements does it affect? Only nodes? It doesn't seem to have any effect on text on ways (text is always vertically centered on the way), I don't know about areas (e.g. with an icon in the middle). It is not clearly described (where and when the anchor is dropped...).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to goodidea.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.