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
82d99ea3
Commit
82d99ea3
authored
8 years ago
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix get union for sparklines
parent
38bcaf4b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+3
-2
cell/utils/utils.js
cell/utils/utils.js
+22
-0
No files found.
cell/model/WorkbookElems.js
View file @
82d99ea3
...
@@ -5315,10 +5315,11 @@ CellArea.prototype = {
...
@@ -5315,10 +5315,11 @@ CellArea.prototype = {
if
(
0
===
i
)
{
if
(
0
===
i
)
{
result
.
assign2
(
item
.
sqref
);
result
.
assign2
(
item
.
sqref
);
}
else
{
}
else
{
result
.
union
(
item
.
sqref
);
result
.
addRange
();
result
.
getLast
().
assign2
(
item
.
sqref
);
}
}
});
});
return
result
;
return
result
.
getUnion
()
;
};
};
sparklineGroup
.
prototype
.
asc_getId
=
function
()
{
sparklineGroup
.
prototype
.
asc_getId
=
function
()
{
return
this
.
Id
;
return
this
.
Id
;
...
...
This diff is collapsed.
Click to expand it.
cell/utils/utils.js
View file @
82d99ea3
...
@@ -701,6 +701,28 @@
...
@@ -701,6 +701,28 @@
this
.
getLast
().
assign2
(
range
);
this
.
getLast
().
assign2
(
range
);
}
}
};
};
SelectionRange
.
prototype
.
getUnion
=
function
()
{
var
result
=
new
SelectionRange
();
var
unionRanges
=
function
(
ranges
,
res
)
{
ranges
.
forEach
(
function
(
item
,
i
)
{
if
(
0
===
i
)
{
res
.
assign2
(
item
);
}
else
{
res
.
union
(
item
);
}
});
};
unionRanges
(
this
.
ranges
,
result
);
var
isUnion
=
true
,
resultTmp
;
while
(
isUnion
&&
!
result
.
isSingleRange
())
{
resultTmp
=
new
SelectionRange
();
unionRanges
(
result
.
ranges
,
resultTmp
);
isUnion
=
result
.
ranges
.
length
!==
resultTmp
.
ranges
.
length
;
result
=
resultTmp
;
}
return
result
;
};
SelectionRange
.
prototype
.
offsetCell
=
function
(
dr
,
dc
,
fCheckSize
)
{
SelectionRange
.
prototype
.
offsetCell
=
function
(
dr
,
dc
,
fCheckSize
)
{
var
done
,
curRange
,
mc
;
var
done
,
curRange
,
mc
;
var
lastRow
=
this
.
activeCell
.
row
;
var
lastRow
=
this
.
activeCell
.
row
;
...
...
This diff is collapsed.
Click to expand it.
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