Skip to content

Commit

Permalink
Adjustments for transferrable symbolinstances
Browse files Browse the repository at this point in the history
  • Loading branch information
yhahn committed Jun 8, 2016
1 parent f8a6944 commit 52bafbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion js/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ SymbolBucket.prototype.addSymbolQuad = function(symbolQuad) {
symbolQuad.tex.x,
symbolQuad.tex.y,
//angle
symbolQuad.angle,
symbolQuad.anchorAngle,
symbolQuad.glyphAngle,
// scales
symbolQuad.maxScale,
symbolQuad.minScale);
Expand Down
9 changes: 6 additions & 3 deletions js/symbol/symbol_quads.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ var SymbolQuadsArray = module.exports = new StructArrayType({
{ type: 'Int16', name: 'texX' },
{ type: 'Int16', name: 'texY' },

//the angle of the label at it's center, not the angle of this quad.
{ type: 'Float32', name: 'angle' },
// the angle of the label at it's center, not the angle of this quad.
{ type: 'Float32', name: 'anchorAngle' },
// the angle of this quad.
{ type: 'Float32', name: 'glyphAngle' },

// quad is only valid for scales < maxScale && scale > minScale.
{ type: 'Float32', name: 'maxScale' },
Expand All @@ -61,7 +63,8 @@ util.extendAll(SymbolQuadsArray.prototype.StructType.prototype, {
new Point(this.blX, this.blY),
new Point(this.brX, this.brY),
{ x: this.texX, y: this.texY, h: this.texH, w: this.texW, height: this.texH, width: this.texW },
this.angle,
this.anchorAngle,
this.glyphAngle,
this.minScale,
this.maxScale);
}
Expand Down

0 comments on commit 52bafbf

Please sign in to comment.