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
53d11c62
Commit
53d11c62
authored
Sep 30, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get selection for create new history point
parent
5570b197
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
15 deletions
+5
-15
cell/model/History.js
cell/model/History.js
+5
-4
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+0
-8
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+0
-3
No files found.
cell/model/History.js
View file @
53d11c62
...
@@ -619,12 +619,13 @@ CHistory.prototype.Create_NewPoint = function()
...
@@ -619,12 +619,13 @@ CHistory.prototype.Create_NewPoint = function()
var
UpdateRigions
=
{};
var
UpdateRigions
=
{};
var
Time
=
new
Date
().
getTime
();
var
Time
=
new
Date
().
getTime
();
var
UndoSheetId
=
null
,
oSelectionState
=
this
.
workbook
.
handlers
.
trigger
(
"
getSelectionState
"
);
var
UndoSheetId
=
null
,
oSelectionState
=
this
.
workbook
.
handlers
.
trigger
(
"
getSelectionState
"
);
var
oSelectRange
=
null
;
// ToDo Берем всегда, т.к. в случае с LastState мы можем не попасть на нужный лист и не заселектить нужный диапазон!
var
oSelectRange
=
this
.
workbook
.
handlers
.
trigger
(
"
getSelection
"
);
var
wsActive
=
this
.
workbook
.
getWorksheet
(
this
.
workbook
.
getActive
());
var
wsActive
=
this
.
workbook
.
getWorksheet
(
this
.
workbook
.
getActive
());
if
(
wsActive
)
if
(
wsActive
)
{
UndoSheetId
=
wsActive
.
getId
();
UndoSheetId
=
wsActive
.
getId
();
// ToDo Берем всегда, т.к. в случае с LastState мы можем не попасть на нужный лист и не заселектить нужный диапазон!
oSelectRange
=
wsActive
.
selectionRange
.
getLast
();
// ToDo get only last selection range
}
// Создаем новую точку
// Создаем новую точку
this
.
Points
[
++
this
.
Index
]
=
{
this
.
Points
[
++
this
.
Index
]
=
{
...
...
cell/view/WorkbookView.js
View file @
53d11c62
...
@@ -712,9 +712,6 @@
...
@@ -712,9 +712,6 @@
this
.
model
.
handlers
.
add
(
"
setSelection
"
,
function
()
{
this
.
model
.
handlers
.
add
(
"
setSelection
"
,
function
()
{
self
.
_onSetSelection
.
apply
(
self
,
arguments
);
self
.
_onSetSelection
.
apply
(
self
,
arguments
);
});
});
this
.
model
.
handlers
.
add
(
"
getSelection
"
,
function
()
{
return
self
.
_onGetSelection
.
apply
(
self
);
});
this
.
model
.
handlers
.
add
(
"
getSelectionState
"
,
function
()
{
this
.
model
.
handlers
.
add
(
"
getSelectionState
"
,
function
()
{
return
self
.
_onGetSelectionState
.
apply
(
self
);
return
self
.
_onGetSelectionState
.
apply
(
self
);
});
});
...
@@ -909,11 +906,6 @@
...
@@ -909,11 +906,6 @@
this
.
controller
.
scroll
(
d
);
this
.
controller
.
scroll
(
d
);
};
};
WorkbookView
.
prototype
.
_onGetSelection
=
function
()
{
var
ws
=
this
.
getWorksheet
(
null
,
true
);
return
ws
?
ws
.
getActiveRangeObj
()
:
null
;
};
WorkbookView
.
prototype
.
_onGetSelectionState
=
function
()
{
WorkbookView
.
prototype
.
_onGetSelectionState
=
function
()
{
var
res
=
null
;
var
res
=
null
;
var
ws
=
this
.
getWorksheet
(
null
,
true
);
var
ws
=
this
.
getWorksheet
(
null
,
true
);
...
...
cell/view/WorksheetView.js
View file @
53d11c62
...
@@ -7353,9 +7353,6 @@
...
@@ -7353,9 +7353,6 @@
this
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onHideComment
"
);
this
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onHideComment
"
);
this
.
_updateSelectionNameAndInfo
();
this
.
_updateSelectionNameAndInfo
();
};
};
WorksheetView
.
prototype
.
getActiveRangeObj
=
function
()
{
return
this
.
activeRange
.
clone
(
true
);
};
WorksheetView
.
prototype
.
setSelection
=
function
(
range
,
validRange
)
{
WorksheetView
.
prototype
.
setSelection
=
function
(
range
,
validRange
)
{
var
selectionRange
,
tmpRange
;
var
selectionRange
,
tmpRange
;
// Проверка на валидность range.
// Проверка на валидность range.
...
...
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