Page 1 of 1

[ANGULAR] finalize(false) -> switch off animation

Posted: Fri Mar 17, 2023 12:38 pm
by denysveovo

Hello, "Bryntum UI Components: Premium Support",
In beforeEventDropFinilized() when I set "valid" to "false" or call "finilize(false)" the event has returning back animation is there a property/method in scheduler to "switch off"/"set duration to 0"/"display none" to THE event IN this call ONLY?
P.S. here is the reason I need it: viewtopic.php?t=24194


Re: [ANGULAR] finalize(false) -> switch off animation

Posted: Fri Mar 17, 2023 1:32 pm
by tasnim

Hi,

You could just remove it like this

    listeners : {
        beforeEventDropFinalize({ context, source }) {
            const { eventStore } = source.project;
            const { eventRecord } = context;
            eventStore.remove(eventRecord);
        }
    }

Hope this will help


Re: [ANGULAR] finalize(false) -> switch off animation

Posted: Mon Mar 20, 2023 10:24 am
by denysveovo

Actually I've tried this approach and the Event Just freezed same way as in the next ticket: https://github.com/bryntum/support/issues/6389
I'm not sure the bugs are related or not, maybe I'll check this approach when the ticket will fixed.
Is there another answer for my first question?


Re: [ANGULAR] finalize(false) -> switch off animation

Posted: Tue Mar 21, 2023 7:33 am
by alex.l

Hi denysveovo,

There is no settings to that. The only way I see here is to add CSS class to event bar DOM that overrides all transitions and remove it later.
Something like this

.notransition {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

You can add it in https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/EventDrag#event-beforeEventDropFinalize event.
To find event bar DOM element, check browser event, property target. it's available in domEvent param, check docs.
After that you need to remove CSS, using https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/EventDrag#event-eventDrop
or
https://bryntum.com/products/schedulerpro/docs/api/Scheduler/feature/EventDrag#event-eventDragAbort