Commit 23e07f75 authored by Alexander.Trofimov's avatar Alexander.Trofimov

update draw

parent bd515972
......@@ -4447,8 +4447,8 @@ function sparklineGroup() {
sparklineGroup.prototype.clearCached = function() {
this.arrCachedSparklines.length = 0;
};
sparklineGroup.prototype.addView = function(oSparklineView) {
this.arrCachedSparklines.push(oSparklineView);
sparklineGroup.prototype.addView = function(oSparklineView, index) {
this.arrCachedSparklines[index] = oSparklineView;
};
sparklineGroup.prototype.draw = function(oDrawingContext) {
var graphics = new CGraphics();
......@@ -4471,6 +4471,9 @@ function sparkline() {
this.sqref = '??'; // ToDo добавить значение по умолчанию
this.f = '??';
}
sparkline.prototype.checkInRange = function(range) {
range.intersectionSimple(this.sqref);
};
// For Auto Filters
/** @constructor */
......
......@@ -1988,24 +1988,26 @@ function DrawingObjects() {
}
};
_this.createSparklineViews = function(oSparkLineGroup)
{
oSparkLineGroup.clearCached();
for(var i = 0; i < oSparkLineGroup.arrSparklines.length; ++i)
{
var oSparklineView = new CSparklineView();
oSparklineView.initFromSparkline(oSparkLineGroup.arrSparklines[i], oSparkLineGroup, worksheet);
oSparkLineGroup.addView(oSparklineView);
_this.clearSparklineGroups = function(range) {
for(var i = 0; i < oSparklineGroups.arrSparklineGroup.length; ++i) {
var oSparklineGroup = oSparklineGroups.arrSparklineGroup[i];
oSparklineGroup.updateCache(range);
}
};
_this.drawSparkLineGroups = function(oDrawingContext, oSparkLineGroups, range)
_this.drawSparklineGroups = function(oDrawingContext, oSparklineGroups, range)
{
for(var i = 0; i < oSparkLineGroups.arrSparklineGroup.length; ++i) {
var oSparklineGroup = oSparkLineGroups.arrSparklineGroup[i];
oSparklineGroup.updateCache(range);
for(var i = 0; i < oSparklineGroups.arrSparklineGroup.length; ++i) {
var oSparklineGroup = oSparklineGroups.arrSparklineGroup[i];
for(var j = 0; j < oSparklineGroup.arrSparklines.length; ++j) {
if (!oSparklineGroup.arrSparklines[i].checkInRange(range)) {
continue;
}
if (!oSparklineGroup.arrCachedSparklines[j]) {
var oSparklineView = new CSparklineView();
oSparklineView.initFromSparkline(oSparklineGroup.arrSparklines[j], oSparklineGroup, worksheet);
oSparklineGroup.addView(oSparklineView);
}
// draw
}
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment