Commit 1a426a64 authored by Oleg Korshul's avatar Oleg Korshul

новая схема в десктопе. Полностью рабочая версия

parent 311ddc2c
......@@ -410,6 +410,7 @@ function CDocMeta()
};
this.pagestreams = [];
this.waitSelectAll = false;
}
CDocMeta.prototype =
......@@ -3178,30 +3179,9 @@ CDocMeta.prototype =
{
bRetValue = true;
var sel = this.Selection;
sel.Page1 = 0;
sel.Line1 = 0;
sel.Glyph1 = 0;
sel.Page2 = 0;
sel.Line2 = 0;
sel.Glyph2 = 0;
sel.IsSelection = false;
if (0 != this.PagesCount)
if (this.selectAllCheckStart())
{
var lLinesLastPage = this.GetCountLines(this.PagesCount - 1);
if (1 != this.PagesCount || 0 != lLinesLastPage)
{
sel.Glyph1 = -2;
sel.Page2 = this.PagesCount - 1;
sel.Line2 = lLinesLastPage;
sel.Glyph2 = -1;
this.OnUpdateSelection();
}
this.selectAll();
}
}
else if ( e.KeyCode == 67 && true === e.CtrlKey ) // Ctrl + C + ...
......@@ -3223,6 +3203,45 @@ CDocMeta.prototype =
return bRetValue;
},
selectAll : function()
{
var sel = this.Selection;
sel.Page1 = 0;
sel.Line1 = 0;
sel.Glyph1 = 0;
sel.Page2 = 0;
sel.Line2 = 0;
sel.Glyph2 = 0;
sel.IsSelection = false;
if (0 != this.PagesCount)
{
var lLinesLastPage = this.GetCountLines(this.PagesCount - 1);
if (1 != this.PagesCount || 0 != lLinesLastPage)
{
sel.Glyph1 = -2;
sel.Page2 = this.PagesCount - 1;
sel.Line2 = lLinesLastPage;
sel.Glyph2 = -1;
this.OnUpdateSelection();
}
}
},
selectAllCheckStart : function()
{
this.waitSelectAll = false;
return true;
},
selectAllCheckEnd : function()
{
},
StartSearch : function(text)
{
editor.WordControl.m_oDrawingDocument.StartSearch();
......
......@@ -64,7 +64,7 @@ CDocMeta.prototype.Load = function(url, doc_bin_base64)
this.Drawings.splice(0, this.Drawings.length);
}
window.g_font_loader.LoadEmbeddedFonts("fonts/", this.Fonts);
AscCommon.g_font_loader.LoadEmbeddedFonts("fonts/", this.Fonts);
var oThis = this;
setInterval(function() {oThis.NativeDrawTimer();}, 40);
......@@ -106,6 +106,11 @@ CDocMeta.prototype.NativeDrawTimer = function()
this.CountWords = _ret[_current++];
this.CountSpaces = _ret[_current++];
this.CountSymbols = _ret[_current++];
if (_page == (this.PagesCount - 1))
{
this.selectAllCheckEnd();
}
}
};
......@@ -152,4 +157,26 @@ CDocMeta.prototype.OnImageLoad = function(obj)
obj.MetaDoc.stopRenderingPage(obj.Page);
};
img.src = _url;
};
CDocMeta.prototype.selectAllCheckStart = function()
{
if (this.pagestreams[this.PagesCount - 1] !== undefined)
{
this.waitSelectAll = false;
return true;
}
this.waitSelectAll = true;
editor.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
};
CDocMeta.prototype.selectAllCheckEnd = function()
{
if (this.waitSelectAll)
{
this.waitSelectAll = false;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.SlowOperation);
this.selectAll();
}
};
\ No newline at end of file
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