From a036aa962a3b915c583df5cd8669622f0b8ec5f5 Mon Sep 17 00:00:00 2001 From: David Schnur Date: Sun, 24 Feb 2013 09:47:21 -0500 Subject: [PATCH] Reverse cache key order to ensure uniqueness. Also switch from dashes to pipes, and remove the angle for now, since we don't currently support rotated text. --- jquery.flot.canvas.js | 3 ++- jquery.flot.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jquery.flot.canvas.js b/jquery.flot.canvas.js index b3367bc..3499d50 100644 --- a/jquery.flot.canvas.js +++ b/jquery.flot.canvas.js @@ -184,8 +184,9 @@ browser, but needs to redraw with canvas text when exporting as an image. // The text + style + angle uniquely identify the text's dimensions // and content; we'll use them to build the entry's text cache key. + // NOTE: We don't support rotated text yet, so the angle is unused. - cacheKey = text + "-" + textStyle + "-" + angle; + cacheKey = textStyle + "|" + text; info = this._textCache[cacheKey]; diff --git a/jquery.flot.js b/jquery.flot.js index 8b0000e..f73cd05 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -268,8 +268,9 @@ Licensed under the MIT license. // The text + style + angle uniquely identify the text's dimensions and // content; we'll use them to build this entry's text cache key. + // NOTE: We don't support rotated text yet, so the angle is unused. - cacheKey = text + "-" + textStyle + "-" + angle; + cacheKey = textStyle + "|" + text; info = this._textCache[cacheKey];