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.
pull/1/head
David Schnur 13 years ago
parent a9a31644c7
commit a036aa962a

@ -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];

@ -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];

Loading…
Cancel
Save