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
faca47f1
Commit
faca47f1
authored
Oct 25, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add asc_showAutoComplete
parent
b5128f1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
32 deletions
+36
-32
cell/api.js
cell/api.js
+5
-0
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+26
-27
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+5
-5
No files found.
cell/api.js
View file @
faca47f1
...
...
@@ -2857,6 +2857,10 @@ var editor;
}
};
spreadsheet_api
.
prototype
.
asc_showAutoComplete
=
function
()
{
this
.
wb
.
showAutoComplete
();
};
spreadsheet_api
.
prototype
.
asc_onMouseUp
=
function
(
event
,
x
,
y
)
{
this
.
controller
.
_onWindowMouseUpExternal
(
event
,
x
,
y
);
};
...
...
@@ -3554,6 +3558,7 @@ var editor;
prot
[
"
asc_increaseFontSize
"
]
=
prot
.
asc_increaseFontSize
;
prot
[
"
asc_decreaseFontSize
"
]
=
prot
.
asc_decreaseFontSize
;
prot
[
"
asc_formatPainter
"
]
=
prot
.
asc_formatPainter
;
prot
[
"
asc_showAutoComplete
"
]
=
prot
.
asc_showAutoComplete
;
prot
[
"
asc_onMouseUp
"
]
=
prot
.
asc_onMouseUp
;
...
...
cell/view/CellEditorView.js
View file @
faca47f1
...
...
@@ -2599,62 +2599,61 @@
};
/** @param event {MouseEvent} */
CellEditor
.
prototype
.
_onWindowMouseMove
=
function
(
event
)
{
if
(
c_oAscCellEditorSelectState
.
no
!==
this
.
isSelectMode
&&
!
this
.
hasCursor
)
{
this
.
_changeSelection
(
this
.
_getCoordinates
(
event
)
);
CellEditor
.
prototype
.
_onWindowMouseMove
=
function
(
event
)
{
if
(
c_oAscCellEditorSelectState
.
no
!==
this
.
isSelectMode
&&
!
this
.
hasCursor
)
{
this
.
_changeSelection
(
this
.
_getCoordinates
(
event
)
);
}
return
true
;
};
/** @param event {MouseEvent} */
CellEditor
.
prototype
.
_onMouseDown
=
function
(
event
)
{
if
(
AscCommon
.
g_inputContext
)
CellEditor
.
prototype
.
_onMouseDown
=
function
(
event
)
{
if
(
AscCommon
.
g_inputContext
)
{
AscCommon
.
g_inputContext
.
externalChangeFocus
();
}
var
pos
;
var
coord
=
this
.
_getCoordinates
(
event
);
if
(
!
window
[
'
IS_NATIVE_EDITOR
'
]
)
{
this
.
clickCounter
.
mouseDownEvent
(
coord
.
x
,
coord
.
y
,
event
.
button
);
var
coord
=
this
.
_getCoordinates
(
event
);
if
(
!
window
[
'
IS_NATIVE_EDITOR
'
]
)
{
this
.
clickCounter
.
mouseDownEvent
(
coord
.
x
,
coord
.
y
,
event
.
button
);
}
this
.
setFocus
(
true
);
this
.
setFocus
(
true
);
this
.
isTopLineActive
=
false
;
this
.
input
.
isFocused
=
false
;
if
(
0
===
event
.
button
)
{
if
(
1
===
this
.
clickCounter
.
getClickCount
()
%
2
)
{
if
(
0
===
event
.
button
)
{
if
(
1
===
this
.
clickCounter
.
getClickCount
()
%
2
)
{
this
.
isSelectMode
=
c_oAscCellEditorSelectState
.
char
;
if
(
!
event
.
shiftKey
)
{
if
(
!
event
.
shiftKey
)
{
this
.
_showCursor
();
pos
=
this
.
_findCursorPosition
(
coord
);
if
(
pos
!==
undefined
)
{
pos
>=
0
?
this
.
_moveCursor
(
kPosition
,
pos
)
:
this
.
_moveCursor
(
pos
);
pos
=
this
.
_findCursorPosition
(
coord
);
if
(
pos
!==
undefined
)
{
pos
>=
0
?
this
.
_moveCursor
(
kPosition
,
pos
)
:
this
.
_moveCursor
(
pos
);
}
}
else
{
this
.
_changeSelection
(
coord
);
}
else
{
this
.
_changeSelection
(
coord
);
}
}
else
{
}
else
{
// Dbl click
this
.
isSelectMode
=
c_oAscCellEditorSelectState
.
word
;
// Окончание слова
var
endWord
=
this
.
textRender
.
getNextWord
(
this
.
cursorPos
);
var
endWord
=
this
.
textRender
.
getNextWord
(
this
.
cursorPos
);
// Начало слова (ищем по окончанию, т.к. могли попасть в пробел)
var
startWord
=
this
.
textRender
.
getPrevWord
(
endWord
);
var
startWord
=
this
.
textRender
.
getPrevWord
(
endWord
);
this
.
_moveCursor
(
kPosition
,
startWord
);
this
.
_selectChars
(
kPosition
,
endWord
);
this
.
_moveCursor
(
kPosition
,
startWord
);
this
.
_selectChars
(
kPosition
,
endWord
);
}
}
return
true
;
};
/** @param event {MouseEvent} */
CellEditor
.
prototype
.
_onMouseUp
=
function
(
event
)
{
if
(
2
===
event
.
button
)
{
this
.
handlers
.
trigger
(
'
onContextMenu
'
,
event
);
CellEditor
.
prototype
.
_onMouseUp
=
function
(
event
)
{
if
(
2
===
event
.
button
)
{
this
.
handlers
.
trigger
(
'
onContextMenu
'
,
event
);
return
true
;
}
this
.
isSelectMode
=
c_oAscCellEditorSelectState
.
no
;
...
...
cell/view/WorkbookView.js
View file @
faca47f1
...
...
@@ -68,7 +68,7 @@
var
c_oAscAsyncAction
=
asc
.
c_oAscAsyncAction
;
var
c_oAscFontRenderingModeType
=
asc
.
c_oAscFontRenderingModeType
;
var
c_oAscAsyncActionType
=
asc
.
c_oAscAsyncActionType
;
function
WorkbookCommentsModel
(
handlers
,
aComments
)
{
this
.
workbook
=
{
handlers
:
handlers
};
...
...
@@ -443,7 +443,7 @@
// AutoComplete
"
showAutoComplete
"
:
function
()
{
self
.
_onS
howAutoComplete
.
apply
(
self
,
arguments
);
self
.
s
howAutoComplete
.
apply
(
self
,
arguments
);
},
"
onContextMenu
"
:
function
(
event
)
{
self
.
handlers
.
trigger
(
"
asc_onContextMenu
"
,
event
);
},
...
...
@@ -806,7 +806,7 @@
}
this
.
clipboard
.
Api
=
this
.
Api
;
this
.
initFormulasList
();
this
.
fReplaceCallback
=
function
()
{
...
...
@@ -1191,7 +1191,7 @@
ws
.
applyFrozenAnchor
(
x
,
y
,
target
);
};
WorkbookView
.
prototype
.
_onS
howAutoComplete
=
function
()
{
WorkbookView
.
prototype
.
s
howAutoComplete
=
function
()
{
var
ws
=
this
.
getWorksheet
();
var
arrValues
=
ws
.
getCellAutoCompleteValues
(
ws
.
model
.
selectionRange
.
activeCell
);
this
.
handlers
.
trigger
(
'
asc_onEntriesListMenu
'
,
arrValues
);
...
...
@@ -2005,7 +2005,7 @@
WorkbookView
.
prototype
.
bIsEmptyClipboard
=
function
()
{
return
this
.
clipboard
.
bIsEmptyClipboard
(
this
.
getCellEditMode
());
};
WorkbookView
.
prototype
.
checkCopyToClipboard
=
function
(
_clipboard
,
_formats
)
{
var
t
=
this
,
ws
;
ws
=
t
.
getWorksheet
();
...
...
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