Avoid polling every 500ms for font size changes

This commit is contained in:
Sergi Mansilla 2011-02-25 16:53:02 +01:00
commit fcc37e2068

View file

@ -77,13 +77,13 @@ var Text = function(parentEl) {
this.$pollSizeChanges = function() {
var self = this;
setInterval(function() {
//setInterval(function() {
var size = self.$measureSizes();
if (self.$characterSize.width !== size.width || self.$characterSize.height !== size.height) {
self.$characterSize = size;
self._dispatchEvent("changeCharaterSize", {data: size});
}
}, 500);
//}, 500);
};
this.$fontStyles = {