Commit a5d57609 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with moving table borders inside the CBlockLevelSdt class.

parent 090ea2a5
......@@ -5137,13 +5137,8 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
var SelectionUse_old = this.Selection.Use;
var Item = this.Content[ContentPos];
var bTableBorder = false;
if (type_Table == Item.GetType())
{
var ElementPageIndex = this.private_GetElementPageIndexByXY(ContentPos, X, Y, this.CurPage);
bTableBorder = null === Item.IsTableBorder(X, Y, ElementPageIndex) ? false : true;
}
var bTableBorder = null === Item.IsTableBorder(X, Y, ElementPageIndex) ? false : true;
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
if (!(true === SelectionUse_old && true === MouseEvent.ShiftKey && true === bOldSelectionIsCommon))
......@@ -5173,7 +5168,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
ClickCount : 1
}, bTableBorder);
if (!(type_Table == Item.GetType() && true == bTableBorder))
if (true !== bTableBorder)
{
this.Selection.Use = true;
this.Selection.StartPos = ContentPos;
......@@ -5187,8 +5182,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
var Hyperlink = Item.Check_Hyperlink(X, Y, ElementPageIndex);
if (null != Hyperlink)
{
this.Selection.Data =
{
this.Selection.Data = {
Hyperlink : true,
Value : Hyperlink
};
......@@ -5197,8 +5191,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
}
else
{
this.Selection.Data =
{
this.Selection.Data = {
TableBorder : true,
Pos : ContentPos,
Selection : SelectionUse_old
......
......@@ -6354,10 +6354,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
var SelectionUse_old = this.Selection.Use;
var Item = this.Content[ContentPos];
var bTableBorder = false;
if (type_Table == Item.GetType())
bTableBorder = ( null != Item.IsTableBorder(X, Y, AbsPage) ? true : false );
var bTableBorder = (null != Item.IsTableBorder(X, Y, AbsPage) ? true : false);
// Убираем селект, кроме случаев либо текущего параграфа, либо при движении границ внутри таблицы
if (!(true === SelectionUse_old && true === MouseEvent.ShiftKey && true === bOldSelectionIsCommon))
......@@ -6384,7 +6381,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
Item.Selection_SetStart(X, Y, ElementPageIndex, MouseEvent);
Item.Selection_SetEnd(X, Y, ElementPageIndex, {Type : AscCommon.g_mouse_event_type_move, ClickCount : 1});
if (!(type_Table == Item.GetType() && true == bTableBorder))
if (true !== bTableBorder)
{
this.Selection.Use = true;
this.Selection.StartPos = ContentPos;
......@@ -6398,8 +6395,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
var Hyperlink = Item.Check_Hyperlink(X, Y, ElementPageIndex);
if (null != Hyperlink)
{
this.Selection.Data =
{
this.Selection.Data = {
Hyperlink : true,
Value : Hyperlink
};
......@@ -6408,8 +6404,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
}
else
{
this.Selection.Data =
{
this.Selection.Data = {
TableBorder : true,
Pos : ContentPos,
Selection : SelectionUse_old
......
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