Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated warnings and added adjustments for initial slotHeight #59

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions dist/fullcalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2694,7 +2694,7 @@ function makeMoment(args, parseAsUTC, parseZone) {
output._ambigZone = true;
}
else if (isSingleString) {
output.zone(input); // if not a valid zone, will assign UTC
output.utcOffset(input); // if not a valid zone, will assign UTC
}
}
}
Expand Down Expand Up @@ -2832,7 +2832,7 @@ FCMoment.prototype.hasZone = function() {
};

// this method implicitly marks a zone
FCMoment.prototype.zone = function(tzo) {
FCMoment.prototype.utcOffset = function(tzo) {

if (tzo != null) {
// FYI, the delete statements need to be before the .zone() call or else chaos ensues
Expand All @@ -2841,7 +2841,7 @@ FCMoment.prototype.zone = function(tzo) {
delete this._ambigZone;
}

return moment.fn.zone.apply(this, arguments);
return moment.fn.utcOffset.apply(this, arguments);
};

// this method implicitly marks a zone
Expand Down Expand Up @@ -4419,7 +4419,8 @@ function AgendaView(element, calendar, viewName) {
var slotHeight0 = slotTable.find('tr:first').height() + 1; // +1 for bottom border
var slotHeight1 = slotTable.find('tr:eq(1)').height();
// HACK: i forget why we do this, but i think a cross-browser issue
slotHeight = (slotHeight0 + slotHeight1) / 2;
// add slotHeight adjustment to prevent misplacing issue by selecting new timeslot
slotHeight = (slotHeight0 + slotHeight1) / 2 - 0.5;

snapRatio = slotDuration / snapDuration;
snapHeight = slotHeight / snapRatio;
Expand Down Expand Up @@ -6352,7 +6353,8 @@ function ResourceView(element, calendar, viewName) {
var slotHeight0 = slotTable.find('tr:first').height() + 1; // +1 for bottom border
var slotHeight1 = slotTable.find('tr:eq(1)').height();
// HACK: i forget why we do this, but i think a cross-browser issue
slotHeight = (slotHeight0 + slotHeight1) / 2;
// add slotHeight adjustment to prevent misplacing issue by selecting new timeslot
slotHeight = (slotHeight0 + slotHeight1) / 2 - 0.5;

snapRatio = slotDuration / snapDuration;
snapHeight = slotHeight / snapRatio;
Expand Down
Loading