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
e307044a
Commit
e307044a
authored
Nov 22, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 33464
parent
58f12a67
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
334 additions
and
360 deletions
+334
-360
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+332
-335
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+2
-25
No files found.
cell/view/WorksheetView.js
View file @
e307044a
...
...
@@ -9763,7 +9763,7 @@
var
isCheckChangeAutoFilter
;
var
functionModelAction
=
null
;
var
lockDraw
=
false
;
// Параметр, при котором не будет отрисовки (т.к. мы просто обновляем информацию на неактивном листе)
var
oChangeData
=
new
AscFormat
.
CChangeTableData
(
null
,
null
,
null
,
null
);
// Обновление для диаграмм
var
lockRange
,
arrChangedRanges
=
[];
var
onChangeWorksheetCallback
=
function
(
isSuccess
)
{
if
(
false
===
isSuccess
)
{
...
...
@@ -9790,7 +9790,8 @@
t
.
objectRender
.
updateDrawingObject
(
updateDrawingObjectsInfo2
.
bInsert
,
updateDrawingObjectsInfo2
.
operType
,
updateDrawingObjectsInfo2
.
updateRange
);
}
t
.
objectRender
.
rebuildChartGraphicObjects
(
oChangeData
);
t
.
model
.
onUpdateRanges
(
arrChangedRanges
);
t
.
objectRender
.
rebuildChartGraphicObjects
(
arrChangedRanges
);
}
t
.
draw
(
lockDraw
);
...
...
@@ -9825,7 +9826,7 @@
reinitRanges
=
true
;
updateDrawingObjectsInfo
=
{
target
:
c_oTargetType
.
ColumnResize
,
col
:
arn
.
c1
};
};
oChangeData
.
hided
=
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
);
arrChangedRanges
.
push
(
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedAll
(
onChangeWorksheetCallback
);
break
;
case
"
hideCols
"
:
...
...
@@ -9835,7 +9836,7 @@
reinitRanges
=
true
;
updateDrawingObjectsInfo
=
{
target
:
c_oTargetType
.
ColumnResize
,
col
:
arn
.
c1
};
};
oChangeData
.
hided
=
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
);
arrChangedRanges
.
push
(
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedAll
(
onChangeWorksheetCallback
);
break
;
case
"
rowHeight
"
:
...
...
@@ -9858,7 +9859,7 @@
reinitRanges
=
true
;
updateDrawingObjectsInfo
=
{
target
:
c_oTargetType
.
RowResize
,
row
:
arn
.
r1
};
};
oChangeData
.
hided
=
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
);
arrChangedRanges
.
push
(
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
)
);
this
.
_isLockedAll
(
onChangeWorksheetCallback
);
break
;
case
"
hideRows
"
:
...
...
@@ -9869,7 +9870,7 @@
reinitRanges
=
true
;
updateDrawingObjectsInfo
=
{
target
:
c_oTargetType
.
RowResize
,
row
:
arn
.
r1
};
};
oChangeData
.
hided
=
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
);
arrChangedRanges
.
push
(
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
)
);
this
.
_isLockedAll
(
onChangeWorksheetCallback
);
break
;
case
"
insCell
"
:
...
...
@@ -9894,8 +9895,8 @@
History
.
EndTransaction
();
};
oChangeData
.
changedRange
=
new
asc_Range
(
arn
.
c1
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
);
this
.
_isLockedCells
(
oChangeData
.
changed
Range
,
null
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
arn
.
c1
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
)
);
this
.
_isLockedCells
(
lock
Range
,
null
,
onChangeWorksheetCallback
);
break
;
case
c_oAscInsertOptions
.
InsertCellsAndShiftDown
:
isCheckChangeAutoFilter
=
...
...
@@ -9916,8 +9917,8 @@
History
.
EndTransaction
();
};
oChangeData
.
changedRange
=
new
asc_Range
(
arn
.
c1
,
arn
.
r1
,
arn
.
c2
,
gc_nMaxRow0
);
this
.
_isLockedCells
(
oChangeData
.
changed
Range
,
null
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
arn
.
c1
,
arn
.
r1
,
arn
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedCells
(
lock
Range
,
null
,
onChangeWorksheetCallback
);
break
;
case
c_oAscInsertOptions
.
InsertColumns
:
isCheckChangeAutoFilter
=
t
.
model
.
autoFilters
.
isRangeIntersectionSeveralTableParts
(
arn
);
...
...
@@ -9938,8 +9939,8 @@
History
.
EndTransaction
();
};
oChangeData
.
added
=
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
);
this
.
_isLockedCells
(
oChangeData
.
added
,
c_oAscLockTypeElemSubType
.
InsertColumns
,
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
arn
.
c1
,
0
,
arn
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedCells
(
lockRange
,
c_oAscLockTypeElemSubType
.
InsertColumns
,
onChangeWorksheetCallback
);
break
;
case
c_oAscInsertOptions
.
InsertRows
:
...
...
@@ -9951,9 +9952,8 @@
t
.
cellCommentator
.
updateCommentsDependencies
(
true
,
val
,
arn
);
};
oChangeData
.
added
=
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
);
this
.
_isLockedCells
(
oChangeData
.
added
,
c_oAscLockTypeElemSubType
.
InsertRows
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
0
,
arn
.
r1
,
gc_nMaxCol0
,
arn
.
r2
));
this
.
_isLockedCells
(
lockRange
,
c_oAscLockTypeElemSubType
.
InsertRows
,
onChangeWorksheetCallback
);
break
;
}
break
;
...
...
@@ -9975,7 +9975,7 @@
c_oAscDeleteOptions
.
DeleteCellsAndShiftLeft
);
}
if
(
range
.
deleteCellsShiftLeft
(
function
()
{
t
.
_cleanCache
(
oChangeData
.
changed
Range
);
t
.
_cleanCache
(
lock
Range
);
t
.
cellCommentator
.
updateCommentsDependencies
(
false
,
val
,
checkRange
);
}))
{
updateDrawingObjectsInfo2
=
{
bInsert
:
false
,
operType
:
val
,
updateRange
:
arn
};
...
...
@@ -9984,9 +9984,9 @@
reinitRanges
=
true
;
};
oChangeData
.
changedRange
=
new
asc_Range
(
checkRange
.
c1
,
checkRange
.
r1
,
gc_nMaxCol0
,
checkRange
.
r2
);
this
.
_isLockedCells
(
oChangeData
.
changed
Range
,
null
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
checkRange
.
c1
,
checkRange
.
r1
,
gc_nMaxCol0
,
checkRange
.
r2
)
);
this
.
_isLockedCells
(
lock
Range
,
null
,
onChangeWorksheetCallback
);
break
;
case
c_oAscDeleteOptions
.
DeleteCellsAndShiftTop
:
isCheckChangeAutoFilter
=
...
...
@@ -10002,7 +10002,7 @@
t
.
model
.
autoFilters
.
isEmptyAutoFilters
(
arn
,
c_oAscDeleteOptions
.
DeleteCellsAndShiftTop
);
}
if
(
range
.
deleteCellsShiftUp
(
function
()
{
t
.
_cleanCache
(
oChangeData
.
changed
Range
);
t
.
_cleanCache
(
lock
Range
);
t
.
cellCommentator
.
updateCommentsDependencies
(
false
,
val
,
checkRange
);
}))
{
updateDrawingObjectsInfo2
=
{
bInsert
:
false
,
operType
:
val
,
updateRange
:
arn
};
...
...
@@ -10012,9 +10012,9 @@
reinitRanges
=
true
;
};
oChangeData
.
changedRange
=
new
asc_Range
(
checkRange
.
c1
,
checkRange
.
r1
,
checkRange
.
c2
,
gc_nMaxRow0
);
this
.
_isLockedCells
(
oChangeData
.
changed
Range
,
null
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
checkRange
.
c1
,
checkRange
.
r1
,
checkRange
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedCells
(
lock
Range
,
null
,
onChangeWorksheetCallback
);
break
;
case
c_oAscDeleteOptions
.
DeleteColumns
:
isCheckChangeAutoFilter
=
t
.
model
.
autoFilters
.
isActiveCellsCrossHalfFTable
(
checkRange
,
...
...
@@ -10035,8 +10035,8 @@
History
.
EndTransaction
();
};
oChangeData
.
removed
=
new
asc_Range
(
checkRange
.
c1
,
0
,
checkRange
.
c2
,
gc_nMaxRow0
);
this
.
_isLockedCells
(
oChangeData
.
removed
,
c_oAscLockTypeElemSubType
.
DeleteColumns
,
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
checkRange
.
c1
,
0
,
checkRange
.
c2
,
gc_nMaxRow0
)
);
this
.
_isLockedCells
(
lockRange
,
c_oAscLockTypeElemSubType
.
DeleteColumns
,
onChangeWorksheetCallback
);
break
;
case
c_oAscDeleteOptions
.
DeleteRows
:
...
...
@@ -10060,9 +10060,8 @@
History
.
EndTransaction
();
};
oChangeData
.
removed
=
new
asc_Range
(
0
,
checkRange
.
r1
,
gc_nMaxCol0
,
checkRange
.
r2
);
this
.
_isLockedCells
(
oChangeData
.
removed
,
c_oAscLockTypeElemSubType
.
DeleteRows
,
onChangeWorksheetCallback
);
arrChangedRanges
.
push
(
lockRange
=
new
asc_Range
(
0
,
checkRange
.
r1
,
gc_nMaxCol0
,
checkRange
.
r2
));
this
.
_isLockedCells
(
lockRange
,
c_oAscLockTypeElemSubType
.
DeleteRows
,
onChangeWorksheetCallback
);
break
;
}
this
.
handlers
.
trigger
(
"
selectionNameChanged
"
,
t
.
getSelectionName
(
/*bRangeText*/
false
));
...
...
@@ -11173,9 +11172,7 @@
}
this
.
model
.
onUpdateRanges
(
arrChanged
);
this
.
objectRender
.
rebuildChartGraphicObjects
(
new
AscFormat
.
CChangeTableData
(
null
,
null
,
null
,
null
,
arrChanged
));
this
.
objectRender
.
rebuildChartGraphicObjects
(
arrChanged
);
this
.
cellCommentator
.
updateCommentPosition
();
this
.
handlers
.
trigger
(
"
onDocumentPlaceChanged
"
);
this
.
draw
(
lockDraw
);
...
...
@@ -11779,9 +11776,9 @@
if
(
this
.
objectRender
&&
this
.
objectRender
.
drawingArea
)
{
this
.
objectRender
.
drawingArea
.
reinitRanges
();
}
var
oChangeData
=
new
AscFormat
.
CChangeTableData
(
null
,
null
,
null
,
null
);
// Обновление для диаграмм
oChangeData
.
change
=
new
asc_Range
(
range
.
c1
,
0
,
range
.
c2
,
gc_nMaxRow0
);
this
.
objectRender
.
rebuildChartGraphicObjects
(
oChangeData
);
var
arrChanged
=
[
new
asc_Range
(
range
.
c1
,
0
,
range
.
c2
,
gc_nMaxRow0
)];
this
.
model
.
onUpdateRanges
(
arrChanged
);
this
.
objectRender
.
rebuildChartGraphicObjects
(
arrChanged
);
this
.
draw
();
this
.
handlers
.
trigger
(
"
reinitializeScroll
"
);
}
else
{
...
...
common/Charts/DrawingObjects.js
View file @
e307044a
...
...
@@ -2963,33 +2963,10 @@ function DrawingObjects() {
if
(
!
worksheet
)
return
;
AscFormat
.
ExecuteNoHistory
(
function
(){
var
i
;
var
wsViews
=
Asc
[
"
editor
"
].
wb
.
wsViews
;
var
changedArr
=
[];
if
(
data
.
changedRange
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
asc_Range
(
data
.
changedRange
.
c1
,
data
.
changedRange
.
r1
,
data
.
changedRange
.
c2
,
data
.
changedRange
.
r2
)))
}
if
(
data
.
added
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
asc_Range
(
data
.
added
.
c1
,
data
.
added
.
r1
,
gc_nMaxCol
,
gc_nMaxRow
)))
}
if
(
data
.
hided
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
asc_Range
(
data
.
hided
.
c1
,
data
.
hided
.
r1
,
data
.
hided
.
c2
,
data
.
hided
.
r2
)))
}
if
(
data
.
removed
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
asc_Range
(
data
.
removed
.
c1
,
data
.
removed
.
r1
,
gc_nMaxCol
,
gc_nMaxRow
)))
}
if
(
Array
.
isArray
(
data
.
arrChanged
))
{
for
(
i
=
0
;
i
<
data
.
arrChanged
.
length
;
++
i
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
asc_Range
(
data
.
arrChanged
[
i
].
c1
,
data
.
arrChanged
[
i
].
r1
,
data
.
arrChanged
[
i
].
c2
,
data
.
arrChanged
[
i
].
r2
)))
}
for
(
var
i
=
0
;
i
<
data
.
length
;
++
i
)
{
changedArr
.
push
(
new
BBoxInfo
(
worksheet
.
model
,
data
[
i
]));
}
for
(
i
=
0
;
i
<
wsViews
.
length
;
++
i
)
...
...
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