Commit 8796c555 authored by Ilya Kirillov's avatar Ilya Kirillov

Fix bug #32170 Сделано, чтобы когда ширина ячейки задавалась почти нулевой...

Fix bug #32170 Сделано, чтобы когда ширина ячейки задавалась почти нулевой (неважно в процентах или сантиметрах), значение сбрасывалось на auto.
parent ad258b76
......@@ -1952,6 +1952,10 @@ CTable.prototype =
// CellsWidth
if (undefined !== Props.CellsWidth)
{
var CellsWidth = Props.CellsWidth;
if (null !== CellsWidth && Math.abs(CellsWidth) < 0.001)
CellsWidth = null;
if (this.Selection.Use === true && table_Selection_Cell === this.Selection.Type)
{
var Count = this.Selection.Data.length;
......@@ -1960,22 +1964,22 @@ CTable.prototype =
var Pos = this.Selection.Data[Index];
var Cell = this.Content[Pos.Row].Get_Cell(Pos.Cell);
if (null === Props.CellsWidth)
if (null === CellsWidth)
Cell.Set_W(new CTableMeasurement(tblwidth_Auto, 0));
else if (Props.CellsWidth > -0.001)
Cell.Set_W(new CTableMeasurement(tblwidth_Mm, Props.CellsWidth));
else if (CellsWidth > -0.001)
Cell.Set_W(new CTableMeasurement(tblwidth_Mm, CellsWidth));
else
Cell.Set_W(new CTableMeasurement(tblwidth_Pct, Math.abs(Props.CellsWidth)));
Cell.Set_W(new CTableMeasurement(tblwidth_Pct, Math.abs(CellsWidth)));
}
}
else
{
if (null === Props.CellsWidth)
if (null === CellsWidth)
this.CurCell.Set_W(new CTableMeasurement(tblwidth_Auto, 0));
else if (Props.CellsWidth > -0.001)
this.CurCell.Set_W(new CTableMeasurement(tblwidth_Mm, Props.CellsWidth));
else if (CellsWidth > -0.001)
this.CurCell.Set_W(new CTableMeasurement(tblwidth_Mm, CellsWidth));
else
this.CurCell.Set_W(new CTableMeasurement(tblwidth_Pct, Math.abs(Props.CellsWidth)));
this.CurCell.Set_W(new CTableMeasurement(tblwidth_Pct, Math.abs(CellsWidth)));
}
}
......
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