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
6dd31636
Commit
6dd31636
authored
Oct 11, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recalc after hide/show rows
parent
1db366b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
cell/model/Workbook.js
cell/model/Workbook.js
+34
-0
No files found.
cell/model/Workbook.js
View file @
6dd31636
...
...
@@ -546,6 +546,11 @@
this
.
calcTree
();
}
},
lockRecalExecute
:
function
(
callback
)
{
this
.
lockRecal
();
callback
();
this
.
unlockRecal
();
},
//defined name
getDefNameByName
:
function
(
name
,
sheetId
,
opt_exact
)
{
var
res
=
null
;
...
...
@@ -859,6 +864,19 @@
}
}
},
addToChangedHiddenRows
:
function
()
{
//notify hidden rows
var
tmpRange
=
new
Asc
.
Range
(
0
,
0
,
gc_nMaxCol0
,
0
);
for
(
var
i
=
0
;
i
<
this
.
wb
.
aWorksheets
.
length
;
++
i
)
{
var
ws
=
this
.
wb
.
aWorksheets
[
i
];
var
hiddenRange
=
ws
.
hiddenManager
.
getHiddenRowsRange
();
if
(
hiddenRange
)
{
tmpRange
.
r1
=
hiddenRange
.
r1
;
tmpRange
.
r2
=
hiddenRange
.
r2
;
this
.
addToChangedRange
(
ws
.
getId
(),
tmpRange
);
}
}
},
addToBuildDependencyCell
:
function
(
cell
)
{
var
sheetId
=
cell
.
ws
.
getId
();
var
unparsedSheet
=
this
.
buildCell
[
sheetId
];
...
...
@@ -919,6 +937,7 @@
}
var
notifyData
=
{
type
:
AscCommon
.
c_oNotifyType
.
Dirty
};
this
.
buildDependency
();
this
.
addToChangedHiddenRows
();
//broadscast Volatile only if something changed
if
(
this
.
changedCell
||
this
.
changedDefName
)
{
this
.
_broadscastVolatile
(
notifyData
);
...
...
@@ -10633,10 +10652,16 @@
this
.
dirty
=
true
;
this
.
recalcHiddenRows
=
[];
this
.
recalcHiddenCols
=
[];
this
.
hiddenRowMin
=
gc_nMaxRow0
;
this
.
hiddenRowMax
=
0
;
}
HiddenManager
.
prototype
.
addHidden
=
function
(
isRow
,
index
)
{
(
isRow
?
this
.
recalcHiddenRows
:
this
.
recalcHiddenCols
).
push
(
index
);
if
(
isRow
)
{
this
.
hiddenRowMin
=
Math
.
min
(
this
.
hiddenRowMin
,
index
);
this
.
hiddenRowMax
=
Math
.
max
(
this
.
hiddenRowMax
,
index
);
}
this
.
setDirty
(
true
);
};
HiddenManager
.
prototype
.
getRecalcHidden
=
function
()
{
...
...
@@ -10655,6 +10680,15 @@
this
.
recalcHiddenCols
=
[];
return
res
;
};
HiddenManager
.
prototype
.
getHiddenRowsRange
=
function
()
{
var
res
;
if
(
this
.
hiddenRowMin
<=
this
.
hiddenRowMax
)
{
res
=
{
r1
:
this
.
hiddenRowMin
,
r2
:
this
.
hiddenRowMax
};
this
.
hiddenRowMin
=
gc_nMaxRow0
;
this
.
hiddenRowMax
=
0
;
}
return
res
;
};
HiddenManager
.
prototype
.
setDirty
=
function
(
val
)
{
this
.
dirty
=
val
;
};
...
...
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