From 92b3b17212125ad0e5fbd780ced94b2a5e9d75f4 Mon Sep 17 00:00:00 2001 From: dfcreative Date: Fri, 24 Mar 2017 10:24:32 -0400 Subject: [PATCH] Fix missed size update --- scatter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scatter.js b/scatter.js index 0dc083f..e20eaaf 100644 --- a/scatter.js +++ b/scatter.js @@ -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) @@ -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',