Avoid polling for font size changes every 500ms

This commit is contained in:
Sergi Mansilla 2011-02-25 17:03:00 +01:00
commit c50a765176

View file

@ -1,4 +1,5 @@
/* vim:ts=4:sts=4:sw=4:
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@ -77,13 +78,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 = {