forked from 0x2620/oxjs
use Ox.Log
This commit is contained in:
parent
92d25b6776
commit
dce2843303
50 changed files with 276 additions and 276 deletions
|
|
@ -866,8 +866,8 @@ Ox.Calendar = function(options, self) {
|
|||
value = unit.value(self.options.date),
|
||||
width = unit.seconds * getPixelsPerSecond(zoom),
|
||||
n = Math.ceil(self.options.width * 1.5/* * 16*/ / width);
|
||||
//Ox.print(zoom, getUnits(zoom).map(function(u) {return u.name(value)}).join('/'))
|
||||
//Ox.print('VALUE', value)
|
||||
//Ox.Log('Calendar', zoom, getUnits(zoom).map(function(u) {return u.name(value)}).join('/'))
|
||||
//Ox.Log('Calendar', 'VALUE', value)
|
||||
Ox.loop(-n, n + 1, function(i) {
|
||||
$elements.push(
|
||||
getEventElement({
|
||||
|
|
@ -921,7 +921,7 @@ Ox.Calendar = function(options, self) {
|
|||
}
|
||||
|
||||
function mousewheel(e, delta, deltaX, deltaY) {
|
||||
//Ox.print('mousewheel', delta, deltaX, deltaY);
|
||||
//Ox.Log('Calendar', 'mousewheel', delta, deltaX, deltaY);
|
||||
var deltaZ = 0;
|
||||
if (!self.mousewheel && deltaY && Math.abs(deltaY) > Math.abs(deltaX)) {
|
||||
if (deltaY < 0 && self.options.zoom > 0) {
|
||||
|
|
@ -1063,7 +1063,7 @@ Ox.Calendar = function(options, self) {
|
|||
}
|
||||
|
||||
function renderTimelines() {
|
||||
Ox.print(self.options.zoom, Math.max(self.options.zoom - 4, 0))
|
||||
Ox.Log('Calendar', self.options.zoom, Math.max(self.options.zoom - 4, 0))
|
||||
getTimelineElements(self.options.zoom).forEach(function($element) {
|
||||
$element.appendTo(self.$scalebar.$element);
|
||||
});
|
||||
|
|
@ -1200,7 +1200,7 @@ Ox.Calendar = function(options, self) {
|
|||
};
|
||||
|
||||
that.addEvent = function(event) {
|
||||
Ox.print('CALENDAR ADD EVENT', event)
|
||||
Ox.Log('Calendar', 'CALENDAR ADD EVENT', event)
|
||||
event = getEventData(event);
|
||||
self.options.events.push(event);
|
||||
getLines();
|
||||
|
|
@ -1222,7 +1222,7 @@ Ox.Calendar = function(options, self) {
|
|||
$element = getEventElementById(id);
|
||||
Ox.forEach(data, function(value, key) {
|
||||
if ($element) {
|
||||
Ox.print('ELEMENT', $element, id)
|
||||
Ox.Log('Calendar', 'ELEMENT', $element, id)
|
||||
if (key == 'name') {
|
||||
$element && $element.html(' ' + value + ' ');
|
||||
} else if (key == 'type') {
|
||||
|
|
@ -1236,7 +1236,7 @@ Ox.Calendar = function(options, self) {
|
|||
}
|
||||
event[key] = value;
|
||||
event = getEventData(event);
|
||||
Ox.print(key, value, 'EVENT:', event)
|
||||
Ox.Log('Calendar', key, value, 'EVENT:', event)
|
||||
if ($element) {
|
||||
getLines();
|
||||
renderCalendar();
|
||||
|
|
@ -1257,7 +1257,7 @@ Ox.Calendar = function(options, self) {
|
|||
};
|
||||
|
||||
that.removeEvent = function() {
|
||||
Ox.print('REMOVE ... SELF.OPTIONS', self.options)
|
||||
Ox.Log('Calendar', 'REMOVE ... SELF.OPTIONS', self.options)
|
||||
var index = Ox.getPositionById(self.options.events, self.options.selected);
|
||||
self.options.events.splice(index, 1);
|
||||
getLines();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue