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

Fix bug preventing resizing of event from the left / delta undefined error #4135

Merged
merged 5 commits into from
Jan 10, 2019

Conversation

livmackintosh
Copy link
Contributor

If you wish to see what this fixes, please see the JSFiddle in the below issue.

Adresses fullcalendar/fullcalendar-workspace#416

  Using the endDelta to determine the durationDelta isn't accurate. The
  endDelta may be undefined but startDelta may exist. If the startDelta
  is negative, then the duration will increase, if positive it will
  decrease. Thus we should sum the inverse of the startDelta with the
  endDelta to get the durationDelta.

  This shim is acting more as pseudo-code as the start/end delta objects
  don't implement addition and subtraction. We need to find a way to do
  this or alternatively use a utility to diff the start / end times from
  the new date definition object. This is what the eventResize callback
  will use anyway.
  Since we already have an updated date profile, we can just diff the
  end and start properties instead of attempting to calculate based on
  the diffs. It means we achieve the same thing but can use existing
  utilities that support moment objects.
  Go back to using the start/end deltas but just pick one or the other
  depending on which one has changed. Don't do fancy calulations to get
  the duration because it seems the durationDelta isn't really a duration
  delta at all...

  Instead, it's simply the delta of the time that has changed. The
  variable name should reflect this but I think I'm done for now if that
  makes sense :).
@arshaw
Copy link
Member

arshaw commented Jan 11, 2019

released in 3.10.0. thanks for the hard work @livmackintosh !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants