Skip to content

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Jun 7, 2017
1 parent 59075d2 commit 0997e07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/symbol/quads.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ function getGlyphQuads(anchor, shaping, boxScale, line, layer, alongLine, global

const baseQuad = {
upright: calculateBaseQuad(positionedGlyph, glyph, rect, textOffset),
// The quad coordinates represent an offset from the anchor. Since
// we use the same anchor for both the 'upright' and 'upside-down'
// copies of each glyph, invert the y dimension of text-offset for the
// upside-down case.
upsideDown: calculateBaseQuad(positionedGlyph, glyph, rect, [textOffset[0], -textOffset[1]])
};

Expand Down

0 comments on commit 0997e07

Please sign in to comment.