Просмотр исходного кода

Revert "eventDragMutationMassager gets calendar"

This reverts commit 26e2a2766d5ffebc7be3c298c2abb5686397d75f.
Adam Shaw 7 лет назад
Родитель
Сommit
922ce01ab5
1 измененных файлов с 4 добавлено и 9 удалено
  1. 4 9
      src/interactions/EventDragging.ts

+ 4 - 9
src/interactions/EventDragging.ts

@@ -139,12 +139,7 @@ export default class EventDragging { // TODO: rename to EventSelectingAndDraggin
         initialCalendar === receivingCalendar ||
         receivingComponent.opt('editable') && receivingComponent.opt('droppable')
       ) {
-        mutation = computeEventMutation(
-          initialHit,
-          hit,
-          receivingCalendar.pluginSystem.hooks.eventDragMutationMassagers,
-          receivingCalendar
-        )
+        mutation = computeEventMutation(initialHit, hit, receivingCalendar.pluginSystem.hooks.eventDragMutationMassagers)
 
         if (mutation) {
           mutatedRelevantEvents = applyMutationToEventStore(relevantEvents, mutation, receivingCalendar)
@@ -361,9 +356,9 @@ export default class EventDragging { // TODO: rename to EventSelectingAndDraggin
 }
 
 
-export type eventDragMutationMassager = (mutation: EventMutation, hit0: Hit, hit1: Hit, calendar: Calendar) => void
+export type eventDragMutationMassager = (mutation: EventMutation, hit0: Hit, hit1: Hit) => void
 
-function computeEventMutation(hit0: Hit, hit1: Hit, massagers: eventDragMutationMassager[], calendar: Calendar): EventMutation {
+function computeEventMutation(hit0: Hit, hit1: Hit, massagers: eventDragMutationMassager[]): EventMutation {
   let dateSpan0 = hit0.dateSpan
   let dateSpan1 = hit1.dateSpan
   let date0 = dateSpan0.range.start
@@ -398,7 +393,7 @@ function computeEventMutation(hit0: Hit, hit1: Hit, massagers: eventDragMutation
   }
 
   for (let massager of massagers) {
-    massager(mutation, hit0, hit1, calendar)
+    massager(mutation, hit0, hit1)
   }
 
   return mutation