Zum Hauptinhalt springen

onBeforeDrag

Description​

Wird ausgelöst, wenn der Benutzer die Drag-/Resize-Operation startet (Version 2.1+)

onBeforeDrag: (id: string, mode: string, e: Event) => boolean

Parameters​

  • id - (required) string - die ID des Events
  • mode - (required) string - der Drag-Modus: "move","resize" oder "create"
  • e - (required) Event - ein natives Event-Objekt

Returns​

  • result - (boolean) - definiert, ob die Standardaktion des Events ausgelöst wird (true) oder abgebrochen wird (false)

Example​

scheduler.attachEvent("onBeforeDrag", (id, mode, e) => {
// any custom logic here
return true;
});

Details​

Das Ereignis wird ausgelöst, wenn der Benutzer im Scheduler auf das verschiebbare Element klickt.

Für den Modus "create" wird der Wert von id nicht bereitgestellt, da ein neues Ereignis noch nicht erstellt wurde.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.