allow widgets to have any height

This commit is contained in:
nightwing 2013-11-11 02:41:35 +04:00
commit 00fcd37829
2 changed files with 12 additions and 11 deletions

View file

@ -175,7 +175,7 @@ function LineWidgets(session) {
w.pixelHeight = w.el.offsetHeight;
}
if (w.rowCount == null)
w.rowCount = Math.ceil(w.pixelHeight / renderer.layerConfig.lineHeight);
w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;
this.session._emit("changeFold", {data:{start:{row: w.row}}});
@ -221,10 +221,12 @@ function LineWidgets(session) {
w.screenWidth = Math.ceil(w.w / config.characterWidth);
}
var rowCount = Math.ceil(w.h / config.lineHeight);
if (w.coverLine)
var rowCount = w.h / config.lineHeight;
if (w.coverLine) {
rowCount -= this.session.getRowLineCount(w.row);
if (rowCount < 0)
rowCount = 0;
}
if (w.rowCount != rowCount) {
w.rowCount = rowCount;
if (w.row < min)