call getComputedStyle once
This commit is contained in:
parent
832707a82b
commit
833f12cd86
1 changed files with 3 additions and 4 deletions
|
|
@ -126,10 +126,9 @@ var Text = function(parentEl) {
|
|||
}
|
||||
|
||||
var style = this.$measureNode.style;
|
||||
for (var prop in this.$fontStyles) {
|
||||
var value = dom.computedStyle(this.element, prop);
|
||||
style[prop] = value;
|
||||
}
|
||||
var computedStyle = dom.computedStyle(this.element);
|
||||
for (var prop in this.$fontStyles)
|
||||
style[prop] = computedStyle[prop];
|
||||
|
||||
var size = {
|
||||
height: this.$measureNode.offsetHeight,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue