Commit a46b39c0 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

fix rotate

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48573 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a1fe380
......@@ -309,6 +309,13 @@
this.xtrange.sx = sx;
this.xtrange.sw = sw;
if (angle === 90 || angle === -90) {
this.bound.height = textW;
} else {
this.bound.height = Math.abs(Math.sin(angle / 180.0 * Math.PI) * textW) + (mul) * tm.height;
}
return this.bound;
},
......
......@@ -3813,14 +3813,12 @@
var rotateTextBound = this.stringRender.getTransformBound(c.getAngle(), 0, 0, this.cols[col].width, this.rows[row].height, tm.width, ha, va);
if (rotateTextBound) {
if (this.rows[row].height < rotateTextBound.sw) {
this.rows[row].height = Math.max(this.rows[row].height, rotateTextBound.sw);
if (this.rows[row].height < rotateTextBound.height) {
this.rows[row].height = Math.max(this.rows[row].height, rotateTextBound.height);
if (!this.rows[row].isDefaultHeight) {
this.model.setRowHeight(this.rows[row].height + this.height_1px, row, row);
}
}
this.isChanged = true;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment