Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
435427a2
Commit
435427a2
authored
Jun 20, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
in function _onEditCell delete excess arguments
parent
acf84ab6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
32 deletions
+14
-32
cell/native/native.js
cell/native/native.js
+1
-1
cell/view/EventsController.js
cell/view/EventsController.js
+3
-3
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+6
-7
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+4
-21
No files found.
cell/native/native.js
View file @
435427a2
...
...
@@ -5591,7 +5591,7 @@ function offline_cell_editor_open(x, y, width, height, ratio, isSelectAll, isFor
wb
.
cellEditor
.
isSelectAll
=
isSelectAll
;
if
(
!
isFormulaInsertMode
)
{
wb
.
_onEditCell
(
x
,
y
,
true
,
undefined
,
undefined
,
true
,
false
);
wb
.
_onEditCell
(
undefined
,
undefined
,
true
,
false
);
}
ws
.
visibleRange
=
range
;
}
...
...
cell/view/EventsController.js
View file @
435427a2
...
...
@@ -704,7 +704,7 @@
// Выставляем блокировку на выход из редактора по клавишам-стрелкам
t
.
strictClose
=
true
;
// При F2 выставляем фокус в редакторе
t
.
handlers
.
trigger
(
"
editCell
"
,
0
,
0
,
/*isCoord*/
false
,
/*isFocus*/
true
,
/*isClearCell*/
false
,
t
.
handlers
.
trigger
(
"
editCell
"
,
/*isFocus*/
true
,
/*isClearCell*/
false
,
/*isHideCursor*/
undefined
,
/*isQuickInput*/
false
);
return
result
;
...
...
@@ -713,7 +713,7 @@
stop
();
// При backspace фокус не в редакторе (стираем содержимое)
t
.
handlers
.
trigger
(
"
editCell
"
,
0
,
0
,
/*isCoord*/
false
,
/*isFocus*/
false
,
/*isClearCell*/
true
,
t
.
handlers
.
trigger
(
"
editCell
"
,
/*isFocus*/
false
,
/*isClearCell*/
true
,
/*isHideCursor*/
undefined
,
/*isQuickInput*/
false
,
/*callback*/
undefined
,
event
);
return
true
;
...
...
@@ -1007,7 +1007,7 @@
if
(
!
this
.
handlers
.
trigger
(
"
getCellEditMode
"
))
{
// При нажатии символа, фокус не ставим
// Очищаем содержимое ячейки
this
.
handlers
.
trigger
(
"
editCell
"
,
0
,
0
,
/*isCoord*/
false
,
/*isFocus*/
false
,
/*isClearCell*/
true
,
this
.
handlers
.
trigger
(
"
editCell
"
,
/*isFocus*/
false
,
/*isClearCell*/
true
,
/*isHideCursor*/
undefined
,
/*isQuickInput*/
true
,
/*callback*/
undefined
,
event
);
}
return
true
;
...
...
cell/view/WorkbookView.js
View file @
435427a2
...
...
@@ -448,7 +448,7 @@
self
.
controller
.
setStrictClose
(
true
);
self
.
cellEditor
.
callTopLineMouseup
=
true
;
if
(
!
self
.
getCellEditMode
()
&&
!
self
.
controller
.
isFillHandleMode
)
{
self
.
_onEditCell
(
0
,
0
,
/*isCoord*/
false
,
/*isFocus*/
true
);
self
.
_onEditCell
(
/*isFocus*/
true
);
}
},
false
);
}
...
...
@@ -1203,11 +1203,11 @@
}
// При dbl клике фокус выставляем в зависимости от наличия текста в ячейке
this
.
_onEditCell
(
x
,
y
,
/*isCoord*/
true
,
/*isFocus*/
undefined
,
/*isClearCell*/
undefined
,
/*isHideCursor*/
isHideCursor
,
/*isQuickInput*/
false
);
this
.
_onEditCell
(
/*isFocus*/
undefined
,
/*isClearCell*/
undefined
,
/*isHideCursor*/
isHideCursor
,
/*isQuickInput*/
false
);
}
};
WorkbookView
.
prototype
.
_onEditCell
=
function
(
x
,
y
,
isCoord
,
isFocus
,
isClearCell
,
isHideCursor
,
isQuickInput
,
callback
,
event
)
{
WorkbookView
.
prototype
.
_onEditCell
=
function
(
isFocus
,
isClearCell
,
isHideCursor
,
isQuickInput
,
callback
,
event
)
{
var
t
=
this
;
// Проверка глобального лока
...
...
@@ -1216,13 +1216,13 @@
}
var
ws
=
t
.
getWorksheet
();
var
activeCellRange
=
ws
.
getActiveCell
(
x
,
y
,
isCoord
);
var
activeCellRange
=
ws
.
getActiveCell
(
0
,
0
,
false
);
var
arn
=
ws
.
activeRange
.
clone
(
true
);
var
editFunction
=
function
()
{
t
.
setCellEditMode
(
true
);
ws
.
setCellEditMode
(
true
);
if
(
!
ws
.
openCellEditor
(
t
.
cellEditor
,
x
,
y
,
isCoord
,
/*fragments*/
undefined
,
/*cursorPos*/
undefined
,
isFocus
,
isClearCell
,
/*isHideCursor*/
isHideCursor
,
/*isQuickInput*/
isQuickInput
,
/*activeRange*/
arn
))
{
if
(
!
ws
.
openCellEditor
(
t
.
cellEditor
,
/*fragments*/
undefined
,
/*cursorPos*/
undefined
,
isFocus
,
isClearCell
,
/*isHideCursor*/
isHideCursor
,
/*isQuickInput*/
isQuickInput
,
/*activeRange*/
arn
))
{
t
.
setCellEditMode
(
false
);
t
.
controller
.
setStrictClose
(
false
);
t
.
controller
.
setFormulaEditMode
(
false
);
...
...
@@ -1920,8 +1920,7 @@
}
};
var
activeCellRange
=
ws
.
getActiveCell
(
0
,
0
,
/*isCoord*/
false
);
var
activeCellRange
=
ws
.
getActiveCell
(
0
,
0
,
false
);
ws
.
_isLockedCells
(
activeCellRange
,
/*subType*/
null
,
openEditor
);
}
};
...
...
cell/view/WorksheetView.js
View file @
435427a2
...
...
@@ -11372,17 +11372,13 @@
return
true
;
};
WorksheetView
.
prototype
.
openCellEditor
=
function
(
editor
,
x
,
y
,
isCoord
,
fragments
,
cursorPos
,
isFocus
,
isClearCell
,
isHideCursor
,
isQuickInput
,
activeRange
)
{
WorksheetView
.
prototype
.
openCellEditor
=
function
(
editor
,
fragments
,
cursorPos
,
isFocus
,
isClearCell
,
isHideCursor
,
isQuickInput
,
activeRange
)
{
var
t
=
this
,
tc
=
this
.
cols
,
tr
=
this
.
rows
,
col
,
row
,
c
,
fl
,
mc
,
bg
,
isMerged
;
var
ar
=
this
.
activeRange
;
if
(
activeRange
)
{
this
.
activeRange
=
activeRange
.
clone
();
}
if
(
this
.
objectRender
.
checkCursorDrawingObject
(
x
,
y
)
)
{
return
false
;
}
function
getVisibleRangeObject
()
{
var
vr
=
t
.
visibleRange
.
clone
(),
offsetX
=
0
,
offsetY
=
0
;
if
(
t
.
topLeftFrozenCell
)
{
...
...
@@ -11410,21 +11406,8 @@
return
{
vr
:
vr
,
offsetX
:
offsetX
,
offsetY
:
offsetY
};
}
if
(
isCoord
)
{
x
*=
asc_getcvt
(
0
/*px*/
,
1
/*pt*/
,
this
.
_getPPIX
()
);
y
*=
asc_getcvt
(
0
/*px*/
,
1
/*pt*/
,
this
.
_getPPIY
()
);
col
=
this
.
_findColUnderCursor
(
x
,
true
);
row
=
this
.
_findRowUnderCursor
(
y
,
true
);
if
(
!
col
||
!
row
)
{
return
false
;
}
col
=
col
.
col
;
row
=
row
.
row
;
}
else
{
col
=
ar
.
startCol
;
row
=
ar
.
startRow
;
}
col
=
ar
.
startCol
;
row
=
ar
.
startRow
;
// Возможно стоит заменить на ячейку из кеша
c
=
this
.
_getVisibleCell
(
col
,
row
);
...
...
@@ -11556,7 +11539,7 @@
copyValue
=
[];
copyValue
[
0
]
=
new
AscCommonExcel
.
Fragment
(
{
text
:
text
,
format
:
v
[
0
].
format
.
clone
()}
);
var
bSuccess
=
t
.
openCellEditor
(
editor
,
0
,
0
,
/*isCoord*/
false
,
/*fragments*/
undefined
,
/*cursorPos*/
undefined
,
isFocus
,
/*isClearCell*/
true
,
/*isHideCursor*/
false
,
/*isQuickInput*/
false
,
activeRange
);
var
bSuccess
=
t
.
openCellEditor
(
editor
,
/*fragments*/
undefined
,
/*cursorPos*/
undefined
,
isFocus
,
/*isClearCell*/
true
,
/*isHideCursor*/
false
,
/*isQuickInput*/
false
,
activeRange
);
if
(
bSuccess
)
{
editor
.
paste
(
copyValue
,
cursorPos
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment