Commit 8adc73a1 authored by Ilya Kirillov's avatar Ilya Kirillov

Implemented moving table border in footnotes.

parent 17f3d4e2
...@@ -373,6 +373,12 @@ CFootnotesController.prototype.StartSelection = function(X, Y, PageAbs, MouseEve ...@@ -373,6 +373,12 @@ CFootnotesController.prototype.StartSelection = function(X, Y, PageAbs, MouseEve
}; };
CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent) CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent)
{ {
if (true === this.IsMovingTableBorder())
{
this.CurFootnote.Selection_SetEnd(X, Y, PageAbs, MouseEvent);
return;
}
var oResult = this.private_GetFootnoteByXY(X, Y, PageAbs); var oResult = this.private_GetFootnoteByXY(X, Y, PageAbs);
if (null === oResult) if (null === oResult)
{ {
...@@ -626,17 +632,7 @@ CFootnotesController.prototype.private_OnNotValidActionForFootnotes = function() ...@@ -626,17 +632,7 @@ CFootnotesController.prototype.private_OnNotValidActionForFootnotes = function()
}; };
CFootnotesController.prototype.private_IsOnFootnoteSelected = function() CFootnotesController.prototype.private_IsOnFootnoteSelected = function()
{ {
// TODO: Заменить на this.Selection.Direction и проверить return (0 !== this.Selection.Direction ? false : true);
var nCounter = 0;
for (var sId in this.Selection.Footnotes)
{
nCounter++;
if (nCounter > 1)
return false;
}
return true;
}; };
CFootnotesController.prototype.private_CheckFootnotesSelectionBeforeAction = function() CFootnotesController.prototype.private_CheckFootnotesSelectionBeforeAction = function()
{ {
...@@ -2153,11 +2149,14 @@ CFootnotesController.prototype.UpdateRulersState = function() ...@@ -2153,11 +2149,14 @@ CFootnotesController.prototype.UpdateRulersState = function()
}; };
CFootnotesController.prototype.UpdateSelectionState = function() CFootnotesController.prototype.UpdateSelectionState = function()
{ {
// TODO: Надо подумать как это вынести в верхнюю функцию
if (true === this.Selection.Use) if (true === this.Selection.Use)
{ {
// TODO: Обработать движения границ таблицы if (true === this.IsMovingTableBorder())
if (false === this.IsEmptySelection()) {
this.DrawingDocument.TargetEnd();
this.DrawingDocument.SetCurrentPage(this.LogicDocument.CurPage);
}
else if (false === this.IsEmptySelection())
{ {
if (true !== this.LogicDocument.Selection.Start) if (true !== this.LogicDocument.Selection.Start)
{ {
......
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