removing .bind mootools call (phase 1/2)

This commit is contained in:
Ezequiel Bergamaschi
2014-07-06 01:15:34 -03:00
parent 3655df6cb8
commit f2b0eb74ea
17 changed files with 126 additions and 120 deletions

View File

@@ -48,14 +48,16 @@ web2d.peer.svg.TextPeer = new Class({
this._text = text;
if (text) {
var lines = text.split('\n');
var me = this;
//FIXME: we could use underscorejs here
lines.forEach(function (line) {
var tspan = window.document.createElementNS(this.svgNamespace, 'tspan');
var tspan = window.document.createElementNS(me.svgNamespace, 'tspan');
tspan.setAttribute('dy', '1em');
tspan.setAttribute('x', this.getPosition().x);
tspan.setAttribute('x', me.getPosition().x);
tspan.textContent = line.length == 0 ? " " : line;
this._native.appendChild(tspan);
}.bind(this));
me._native.appendChild(tspan);
});
}
},