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({
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,8 @@ Ox.PATH = Array.prototype.slice.apply(
|
|||
})[0].src.replace('Ox.js', '');
|
||||
//@ Ox.PREFIXES <[str]> <code>['K', 'M', 'G', 'T', 'P']</code>
|
||||
Ox.PREFIXES = ['K', 'M', 'G', 'T', 'P'];
|
||||
//@ Ox.SEASONS <[str]> Names of the seasons of the year
|
||||
Ox.SEASONS = ['Winter', 'Spring', 'Summer', 'Fall'];
|
||||
//@ Ox.SYMBOLS <obj> Unicode characters for symbols
|
||||
Ox.SYMBOLS = {
|
||||
DOLLAR: '\u0024',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue