Multiline working :)
This commit is contained in:
@@ -33,9 +33,6 @@ web2d.peer.svg.GroupPeer = new Class({
|
||||
this._coordSize.width = width;
|
||||
this._coordSize.height = height;
|
||||
|
||||
console.log("coordSize.width:" + width);
|
||||
console.log("coordSize.height:" + height);
|
||||
|
||||
if (change)
|
||||
this.updateTransform();
|
||||
web2d.peer.utils.EventUtils.broadcastChangeEvent(this, "strokeStyle");
|
||||
@@ -73,21 +70,6 @@ web2d.peer.svg.GroupPeer = new Class({
|
||||
var cx = this._position.x - this._coordOrigin.x * sx;
|
||||
var cy = this._position.y - this._coordOrigin.y * sy;
|
||||
|
||||
console.log("------------------");
|
||||
console.log("this._coordSize.width:" + this._coordSize.width);
|
||||
console.log("this._coordSize.height:" + this._coordSize.height);
|
||||
|
||||
console.log("cx:" + cx);
|
||||
console.log("cy:" + cy);
|
||||
|
||||
console.log("this._size.width:" + this._size.width);
|
||||
console.log("this._size.height:" + this._size.height);
|
||||
|
||||
console.log("sx:" + sx);
|
||||
console.log("sy:" + sy);
|
||||
console.log("------------------");
|
||||
|
||||
|
||||
this._native.setAttribute("transform", "translate(" + cx + "," + cy + ") scale(" + sx + "," + sy + ")");
|
||||
},
|
||||
|
||||
|
@@ -55,7 +55,7 @@ web2d.peer.svg.TextPeer = new Class({
|
||||
var tspan = window.document.createElementNS(this.svgNamespace, 'tspan');
|
||||
tspan.setAttribute('dy', '1em');
|
||||
tspan.setAttribute('x', this.getPosition().x);
|
||||
var tspanContent = window.document.createTextNode(line);
|
||||
var tspanContent = window.document.createTextNode(line.length == 0 ? " " : line);
|
||||
tspan.appendChild(tspanContent);
|
||||
tspans.push(tspan);
|
||||
|
||||
@@ -107,11 +107,8 @@ web2d.peer.svg.TextPeer = new Class({
|
||||
this._native.setAttribute('font-size', this._font.getGraphSize());
|
||||
this._native.setAttribute('font-style', this._font.getStyle());
|
||||
this._native.setAttribute('font-weight', this._font.getWeight());
|
||||
|
||||
var scale = this._font.getFontScale();
|
||||
this._native.xFontScale = scale.toFixed(1);
|
||||
|
||||
},
|
||||
|
||||
setColor : function(color) {
|
||||
this._native.setAttribute('fill', color);
|
||||
},
|
||||
|
Reference in New Issue
Block a user