Commit a036aa96 authored by David Schnur's avatar David Schnur

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.
parent a9a31644
...@@ -184,8 +184,9 @@ browser, but needs to redraw with canvas text when exporting as an image. ...@@ -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 // The text + style + angle uniquely identify the text's dimensions
// and content; we'll use them to build the entry's text cache key. // 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]; info = this._textCache[cacheKey];
......
...@@ -268,8 +268,9 @@ Licensed under the MIT license. ...@@ -268,8 +268,9 @@ Licensed under the MIT license.
// The text + style + angle uniquely identify the text's dimensions and // The text + style + angle uniquely identify the text's dimensions and
// content; we'll use them to build this entry's text cache key. // 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]; info = this._textCache[cacheKey];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment