Commit 65797e11 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

[ios] cell editor

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64255 954022d7-b5bf-4e40-9824-e11837661b57
parent a95aec06
...@@ -1050,16 +1050,20 @@ ...@@ -1050,16 +1050,20 @@
var ctx = this.overlayCtx, ppix = ctx.getPPIX(), ppiy = ctx.getPPIY(); var ctx = this.overlayCtx, ppix = ctx.getPPIX(), ppiy = ctx.getPPIY();
var begPos, endPos, top, top1, top2, begInfo, endInfo, line1, line2, i; var begPos, endPos, top, top1, top2, begInfo, endInfo, line1, line2, i;
var selection = [];
function drawRect(x, y, w, h) { function drawRect(x, y, w, h) {
ctx.fillRect( selection.push([asc_calcnpt(x, ppix), asc_calcnpt(y, ppiy), asc_calcnpt(w, ppix), asc_calcnpt(h, ppiy)]);
asc_calcnpt(x, ppix), asc_calcnpt(y, ppiy),
asc_calcnpt(w, ppix), asc_calcnpt(h, ppiy)); //ctx.fillRect(
// asc_calcnpt(x, ppix), asc_calcnpt(y, ppiy),
// asc_calcnpt(w, ppix), asc_calcnpt(h, ppiy));
} }
begPos = this.selectionBegin; begPos = this.selectionBegin;
endPos = this.selectionEnd; endPos = this.selectionEnd;
ctx.setFillStyle(this.defaults.selectColor).clear(); //ctx.setFillStyle(this.defaults.selectColor).clear();
if (begPos !== endPos && !this.isTopLineActive) { if (begPos !== endPos && !this.isTopLineActive) {
top = this.textRender.calcLineOffset(this.topLineIndex); top = this.textRender.calcLineOffset(this.topLineIndex);
...@@ -1081,6 +1085,8 @@ ...@@ -1081,6 +1085,8 @@
} }
} }
} }
return selection;
}; };
// Cursor // Cursor
...@@ -1407,28 +1413,28 @@ ...@@ -1407,28 +1413,28 @@
t.selectionBegin = begPos; t.selectionBegin = begPos;
t.selectionEnd = endPos; t.selectionEnd = endPos;
t._drawSelection(); //t._drawSelection();
if (t.isTopLineActive && !t.skipTLUpdate) {t._updateTopLineCurPos();} if (t.isTopLineActive && !t.skipTLUpdate) {t._updateTopLineCurPos();}
}; };
CellEditor.prototype._changeSelection = function (coord) { CellEditor.prototype._changeSelection = function (coord) {
var t = this; var t = this;
function doChangeSelection(coord) { function doChangeSelection(coord) {
var pos = t._findCursorPosition(coord); var pos = t._findCursorPosition(coord);
if (pos !== undefined) {pos >= 0 ? t._selectChars(kPosition, pos) : t._selectChars(pos);} if (pos !== undefined) {pos >= 0 ? t._selectChars(kPosition, pos) : t._selectChars(pos);}
if (t.isSelectMode) { // if (t.isSelectMode) {
t.selectionTimer = window.setTimeout( // t.selectionTimer = window.setTimeout(
function () {doChangeSelection(coord);}, // function () {doChangeSelection(coord);},
t.defaults.selectionTimeout); // t.defaults.selectionTimeout);
} // }
} }
doChangeSelection(coord); doChangeSelection(coord);
//window.clearTimeout(t.selectionTimer); //window.clearTimeout(t.selectionTimer);
//t.selectionTimer = window.setTimeout(function () {doChangeSelection(coord);}, 0); //t.selectionTimer = window.setTimeout(function () {doChangeSelection(coord);}, 0);
}; };
CellEditor.prototype._findFragment = function (pos, fragments) { CellEditor.prototype._findFragment = function (pos, fragments) {
var i, begin, end; var i, begin, end;
......
This diff is collapsed.
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