forked from 0x2620/oxjs
fix some scrollbar scale bugs
This commit is contained in:
parent
385aac008c
commit
457e175455
3 changed files with 5 additions and 5 deletions
|
|
@ -178,14 +178,11 @@ Ox.Calendar = function(options, self) {
|
|||
id: 'month',
|
||||
seconds: 365.2425 / 12 * 86400,
|
||||
date: function(i) {
|
||||
///*
|
||||
var date = new Date();
|
||||
date.setUTCFullYear(Math.floor(i / 12) + 1970);
|
||||
date.setUTCMonth(Ox.mod(i, 12));
|
||||
date.setUTCDate(0); // fixme: WTF??
|
||||
return date;
|
||||
//*/
|
||||
//return new Date(Date.UTC(Math.floor(i / 12) + 1970, Ox.mod(i, 12), 1));
|
||||
},
|
||||
name: function(i) {
|
||||
return Ox.SHORT_MONTHS[Ox.mod(i, 12)] + ' ' + Math.floor(i / 12 + 1970)
|
||||
|
|
@ -451,7 +448,7 @@ Ox.Calendar = function(options, self) {
|
|||
marginLeft: (e.clientX - self.drag.x) + 'px'
|
||||
});
|
||||
self.$scrollbar.css({
|
||||
marginLeft: Math.round((e.clientX - self.drag.x) / 16) + 'px'
|
||||
marginLeft: Math.round((e.clientX - self.drag.x) / getScrollbarFactor()) + 'px'
|
||||
});
|
||||
//*/
|
||||
/*
|
||||
|
|
@ -515,7 +512,7 @@ Ox.Calendar = function(options, self) {
|
|||
|
||||
function dragafterScrollbar(e) {
|
||||
self.options.date = new Date(
|
||||
+self.options.date + (self.drag.x - e.clientX) * getSecondsPerPixel() * 1000 * 16
|
||||
+self.options.date + (self.drag.x - e.clientX) * getSecondsPerPixel() * 1000 * getScrollbarFactor()
|
||||
);
|
||||
// fixme: duplicated
|
||||
self.$content.css({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue