Well, I was certain, but I looked again and realized that because scale is set in generateNewPreview, which is several callbacks deep, it is possible that a resize event might happen in between. I've added a line in the constructor that defaults it to 1.0 to avoid that.