forked from 0x2620/oxjs
only draw half of the calendar background stripes
This commit is contained in:
parent
457e175455
commit
1950b514b5
3 changed files with 16 additions and 14 deletions
|
|
@ -640,16 +640,18 @@ Ox.Calendar = function(options, self) {
|
|||
width = unit.seconds * getPixelsPerSecond(zoom),
|
||||
n = Math.ceil(self.options.width * 1.5/* * 16*/ / width);
|
||||
Ox.loop(-n, n + 1, function(i) {
|
||||
$elements.push(
|
||||
new Ox.Element()
|
||||
.addClass(
|
||||
u == 0 ? 'line' : Ox.mod(value + i, 2) == 0 ? 'even' : 'odd'
|
||||
)
|
||||
.css({
|
||||
left: getPosition(unit.date(value + i), zoom) + 'px',
|
||||
width: (u == 0 ? 1 : width) + 'px'
|
||||
})
|
||||
);
|
||||
if (u == 0 || Ox.mod(value + i, 2)) {
|
||||
$elements.push(
|
||||
new Ox.Element()
|
||||
.addClass(
|
||||
u == 0 ? 'line' : ''
|
||||
)
|
||||
.css({
|
||||
left: getPosition(unit.date(value + i), zoom) + 'px',
|
||||
width: (u == 0 ? 1 : width) + 'px'
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
return $elements;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue