Fix some bugs in drag to create event

- Firefox tried to do drag to create & drag to resize when resizing an event
- Speed improvement for mouseover
This commit is contained in:
nathangray 2016-07-04 10:26:38 -06:00
parent 2bf00ad44d
commit 56866b8bce

View File

@ -328,27 +328,6 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
}) })
.on('mousemove', function(event) { .on('mousemove', function(event) {
timegrid._get_time_from_position(event.clientX, event.clientY); timegrid._get_time_from_position(event.clientX, event.clientY);
if(timegrid.drag_create.event && timegrid.drag_create.parent && timegrid.drag_create.end)
{
var end = jQuery.extend({}, timegrid.gridHover[0].dataset);
if(end.date)
{
timegrid.date_helper.set_year(end.date.substring(0,4));
timegrid.date_helper.set_month(end.date.substring(4,6));
timegrid.date_helper.set_date(end.date.substring(6,8));
if(end.hour)
{
timegrid.date_helper.set_hours(end.hour);
}
if(end.minute)
{
timegrid.date_helper.set_minutes(end.minute);
}
timegrid.drag_create.end.date = timegrid.date_helper.get_value();
}
timegrid._drag_update_event();
}
}) })
.on('mouseout', function(event) { .on('mouseout', function(event) {
if(timegrid.div.has(event.relatedTarget).length === 0) if(timegrid.div.has(event.relatedTarget).length === 0)