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
81138dc2
Commit
81138dc2
authored
Oct 10, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix chart ranges
fix move formula and chart ranges
parent
d6a63849
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
115 deletions
+99
-115
cell/model/History.js
cell/model/History.js
+6
-7
cell/model/Workbook.js
cell/model/Workbook.js
+25
-30
cell/view/EventsController.js
cell/view/EventsController.js
+1
-1
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+2
-2
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+57
-60
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+6
-13
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+2
-2
No files found.
cell/model/History.js
View file @
81138dc2
...
...
@@ -239,15 +239,14 @@ CHistory.prototype.UndoRedoPrepare = function (oRedoObjectParam, bUndo) {
else
this
.
workbook
.
bRedoChanges
=
true
;
if
(
!
window
[
"
NATIVE_EDITOR_ENJINE
"
])
{
if
(
!
window
[
"
NATIVE_EDITOR_ENJINE
"
])
{
var
wsViews
=
Asc
[
"
editor
"
].
wb
.
wsViews
;
for
(
var
i
=
0
;
i
<
wsViews
.
length
;
++
i
)
{
if
(
wsViews
[
i
]
&&
wsViews
[
i
].
objectRender
&&
wsViews
[
i
].
objectRender
.
controller
)
{
wsViews
[
i
].
objectRender
.
controller
.
resetSelection
(
undefined
,
true
);
}
if
(
wsViews
[
i
]
&&
wsViews
[
i
].
isChartAreaEditMode
)
{
wsViews
[
i
].
isChartAreaEditMode
=
false
;
wsViews
[
i
].
arrActiveChartsRanges
=
[];
if
(
wsViews
[
i
])
{
if
(
wsViews
[
i
].
objectRender
&&
wsViews
[
i
].
objectRender
.
controller
)
{
wsViews
[
i
].
objectRender
.
controller
.
resetSelection
(
undefined
,
true
);
}
wsViews
[
i
].
endEditChart
();
}
}
}
...
...
cell/model/Workbook.js
View file @
81138dc2
...
...
@@ -2927,28 +2927,27 @@ Workbook.prototype.DeserializeHistory = function(aChanges, fCallback){
if
(
oThis
.
oApi
.
collaborativeEditing
.
getFast
()){
AscCommon
.
CollaborativeEditing
.
Clear_DocumentPositions
();
}
for
(
var
i
in
wsViews
)
{
if
(
isRealObject
(
wsViews
[
i
])
&&
isRealObject
(
wsViews
[
i
].
objectRender
)
&&
isRealObject
(
wsViews
[
i
].
objectRender
.
controller
))
{
if
(
wsViews
[
i
].
isChartAreaEditMode
)
{
wsViews
[
i
].
isChartAreaEditMode
=
false
;
wsViews
[
i
].
arrActiveChartsRanges
=
[];
}
if
(
oThis
.
oApi
.
collaborativeEditing
.
getFast
()){
var
oState
=
wsViews
[
i
].
objectRender
.
saveStateBeforeLoadChanges
();
if
(
oState
){
if
(
oState
.
Pos
)
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
Pos
);
if
(
oState
.
StartPos
)
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
StartPos
);
if
(
oState
.
EndPos
)
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
EndPos
);
}
}
wsViews
[
i
].
objectRender
.
controller
.
resetSelection
();
}
}
for
(
var
i
in
wsViews
)
{
if
(
isRealObject
(
wsViews
[
i
])
&&
isRealObject
(
wsViews
[
i
].
objectRender
)
&&
isRealObject
(
wsViews
[
i
].
objectRender
.
controller
))
{
wsViews
[
i
].
endEditChart
();
if
(
oThis
.
oApi
.
collaborativeEditing
.
getFast
())
{
var
oState
=
wsViews
[
i
].
objectRender
.
saveStateBeforeLoadChanges
();
if
(
oState
)
{
if
(
oState
.
Pos
)
{
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
Pos
);
}
if
(
oState
.
StartPos
)
{
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
StartPos
);
}
if
(
oState
.
EndPos
)
{
AscCommon
.
CollaborativeEditing
.
Add_DocumentPosition
(
oState
.
EndPos
);
}
}
}
wsViews
[
i
].
objectRender
.
controller
.
resetSelection
();
}
}
oFormulaLocaleInfo
.
Parse
=
false
;
oFormulaLocaleInfo
.
DigitSep
=
false
;
History
.
Clear
();
...
...
@@ -3008,14 +3007,10 @@ Workbook.prototype.DeserializeHistoryNative = function(oRedoObjectParam, data, i
if
(
null
==
oRedoObjectParam
)
{
var
wsViews
=
window
[
"
Asc
"
][
"
editor
"
].
wb
.
wsViews
;
for
(
var
i
in
wsViews
)
{
if
(
isRealObject
(
wsViews
[
i
])
&&
isRealObject
(
wsViews
[
i
].
objectRender
)
&&
isRealObject
(
wsViews
[
i
].
objectRender
.
controller
))
{
if
(
wsViews
[
i
].
isChartAreaEditMode
)
{
wsViews
[
i
].
isChartAreaEditMode
=
false
;
wsViews
[
i
].
arrActiveChartsRanges
=
[];
}
for
(
var
i
in
wsViews
)
{
if
(
isRealObject
(
wsViews
[
i
])
&&
isRealObject
(
wsViews
[
i
].
objectRender
)
&&
isRealObject
(
wsViews
[
i
].
objectRender
.
controller
))
{
wsViews
[
i
].
endEditChart
();
wsViews
[
i
].
objectRender
.
controller
.
resetSelection
();
}
}
...
...
cell/view/EventsController.js
View file @
81138dc2
...
...
@@ -607,7 +607,7 @@
if
(
!
d
)
return
;
t
.
scroll
(
d
);
asc_applyFunction
(
callback
);
}
,
event
.
metaKey
||
event
.
ctrlKey
);
});
};
/**
...
...
cell/view/WorkbookView.js
View file @
81138dc2
...
...
@@ -1154,9 +1154,9 @@
};
// Обработка перемещения диапазона
WorkbookView
.
prototype
.
_onMoveRangeHandle
=
function
(
x
,
y
,
callback
,
ctrlKey
)
{
WorkbookView
.
prototype
.
_onMoveRangeHandle
=
function
(
x
,
y
,
callback
)
{
var
ws
=
this
.
getWorksheet
();
var
d
=
ws
.
changeSelectionMoveRangeHandle
(
x
,
y
,
ctrlKey
);
var
d
=
ws
.
changeSelectionMoveRangeHandle
(
x
,
y
);
asc_applyFunction
(
callback
,
d
);
};
...
...
cell/view/WorksheetView.js
View file @
81138dc2
This diff is collapsed.
Click to expand it.
common/Charts/DrawingObjects.js
View file @
81138dc2
...
...
@@ -2494,10 +2494,7 @@ function DrawingObjects() {
aObjects
.
length
=
0
;
var
listRange
=
new
AscCommonExcel
.
Range
(
worksheet
.
model
,
0
,
0
,
worksheet
.
nRowsCount
-
1
,
worksheet
.
nColsCount
-
1
);
listRange
.
cleanAll
();
if
(
worksheet
.
isChartAreaEditMode
)
{
worksheet
.
isChartAreaEditMode
=
false
;
worksheet
.
arrActiveChartsRanges
=
[];
}
worksheet
.
endEditChart
();
var
asc_chart_binary
=
new
Asc
.
asc_CChartBinary
();
asc_chart_binary
.
asc_setBinary
(
chart
[
"
binary
"
]);
asc_chart_binary
.
asc_setThemeBinary
(
chart
[
"
themeBinary
"
]);
...
...
@@ -3515,7 +3512,7 @@ function DrawingObjects() {
if
(
aObjects
[
i
].
graphicObject
.
Id
==
graphicId
)
{
aObjects
[
i
].
graphicObject
.
deselect
(
_this
.
controller
);
if
(
aObjects
[
i
].
isChart
()
)
worksheet
.
arrActiveChartsRanges
=
[]
;
worksheet
.
endEditChart
()
;
aObjects
.
splice
(
i
,
1
);
bRedraw
=
true
;
position
=
i
;
...
...
@@ -3940,7 +3937,7 @@ function DrawingObjects() {
_this
.
selectDrawingObjectRange
=
function
(
drawing
)
{
worksheet
.
cleanSelection
();
worksheet
.
arrActiveChartsRanges
=
[]
;
worksheet
.
endEditChart
()
;
if
(
!
drawing
.
bbox
||
drawing
.
bbox
.
worksheet
!==
worksheet
.
model
)
return
;
...
...
@@ -3961,17 +3958,13 @@ function DrawingObjects() {
}
var
BB
=
drawing
.
bbox
.
seriesBBox
;
var
range
=
asc
.
Range
(
BB
.
c1
,
BB
.
r1
,
BB
.
c2
,
BB
.
r2
,
true
);
worksheet
.
arrActiveChartsRanges
.
push
(
range
);
worksheet
.
isChartAreaEditMode
=
true
;
worksheet
.
_drawSelection
();
worksheet
.
setChartRange
(
range
);
worksheet
.
_drawSelection
();
};
_this
.
unselectDrawingObjects
=
function
()
{
if
(
worksheet
.
isChartAreaEditMode
)
{
worksheet
.
isChartAreaEditMode
=
false
;
worksheet
.
arrActiveChartsRanges
=
[];
}
worksheet
.
endEditChart
();
_this
.
controller
.
resetSelectionState
();
_this
.
OnUpdateOverlay
();
};
...
...
common/Drawings/CommonController.js
View file @
81138dc2
...
...
@@ -813,7 +813,7 @@ DrawingObjectsController.prototype =
}
this
.
chartForProps
=
this
.
getSelectionState
();
this
.
resetSelection
();
this
.
drawingObjects
.
getWorksheet
().
arrActiveChartsRanges
=
[]
;
this
.
drawingObjects
.
getWorksheet
().
endEditChart
()
;
var
oldIsStartAdd
=
window
[
"
Asc
"
][
"
editor
"
].
isStartAddShape
;
window
[
"
Asc
"
][
"
editor
"
].
isStartAddShape
=
true
;
this
.
updateOverlay
();
...
...
@@ -4620,7 +4620,7 @@ DrawingObjectsController.prototype =
var
worksheet
=
this
.
drawingObjects
.
getWorksheet
();
if
(
worksheet
)
{
worksheet
.
arrActiveChartsRanges
=
[]
;
worksheet
.
endEditChart
()
;
}
if
(
this
.
selection
.
groupSelection
)
{
...
...
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