Skip to content

Commit

Permalink
Merge pull request #1 from gl-vis/size-update
Browse files Browse the repository at this point in the history
Fix missed size update
  • Loading branch information
dy committed Mar 24, 2017
2 parents 44ee359 + 92b3b17 commit fff7a48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ proto.update = function(options) {
for (var i = 0, l = sizes.length; i < l; ++i) {
if (sizes[i] > maxSize) maxSize = sizes[i]
}
var oldStep = this.charStep
this.charStep = clamp(Math.ceil(maxSize*4), 128, 768)

var chars = Object.keys(glyphChars)
Expand All @@ -320,7 +321,7 @@ proto.update = function(options) {
}

//do not overupdate atlas
if (!this.chars || (this.chars+'' !== chars+'')) {
if (!this.chars || (this.chars+'' !== chars+'') || this.charStep != oldStep) {
this.charCanvas = atlas({
canvas: this.charCanvas,
family: 'sans-serif',
Expand Down

0 comments on commit fff7a48

Please sign in to comment.