Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#2439 closed bug (fixed)

canvas and textAlign: middle not recognized

Reported by: fredj Owned by: crschmidt
Priority: minor Milestone: 2.9 Release
Component: Renderer.Canvas Version: SVN
Keywords: Cc:
State: Complete

Description

http://openlayers.org/dev/examples/symbolizers-fill-stroke-graphic.html?renderer=Canvas

don't draw the labels because the textAlign value is "middle": this value is not recognized. Valid values are: start, end, left, right, or center.

See: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-textalign

Attachments (1)

2439.0.patch (723 bytes) - added by fredj 6 years ago.
change the textAlign default value from middle to center

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by fredj

The examples works with FF 3.0 but not with FF 3.5.6 and 3.6

Changed 6 years ago by fredj

change the textAlign default value from middle to center

comment:2 Changed 6 years ago by fredj

  • State set to Review

The patch change the default value for textAlign.

Works with FF 3.0.17 and 3.6 (on linux).

Please review (and test with other canvas friendly browsers)

comment:3 Changed 5 years ago by bartvde

  • Milestone changed from 2.10 Release to 2.9 Release

comment:4 Changed 5 years ago by bartvde

  • Resolution set to fixed
  • State changed from Review to Complete
  • Status changed from new to closed

(In [10113]) canvas and textAlign: middle not recognized, I made one change to original patch to not include the default value in LABEL_ALIGN since I did not see the purpose of adding that, p=fredj, r=me (closes #2439)

comment:5 Changed 5 years ago by bartvde

Btw, fredj, sorry for taking your commit. I did not have enough coffee as yet apparantly.

Note: See TracTickets for help on using tickets.