Premium support for our pure JavaScript UI components


Post by syl »

Hello,

I would like to know if it is possible to avoid defining a time resolution in the view preset and avoid that events "snap" to the closest time resolution tick when dropping them.

Or does the only possible option consist in using a tiny time resolution, such as 1 second or less?

Thanks!


Post by Animal »

It seems that the EventDrag should be allowed to be configured with resolutionUnit and resolutionIncrement

and then its adjustDate method should be

    adjustStartDate(startDate, timeDiff) {
        const scheduler = this.currentOverClient;

        return scheduler.timeAxis.roundDate(new Date(startDate - 0 + timeDiff), scheduler.snapRelativeToEventStartDate ? startDate : false, this.resolutionUnit, this.resolutionIncrement);
    }

If they are undefined, the TimeAxis will use its own, but if passed, they will be used.

https://github.com/bryntum/support/issues/5375


Post by syl »

Sure, but in my case, I simply don't care (and don't want to care) about time resolutions.
I was wondering if it would be possible to avoid having to configure any sort of time resolution at all.

Does that make sense?

Sylvain


Post by alex.l »

Hi Sylvain,

There should be some default behaviour, and possibly it won't be exactly that your use case is expecting. I guess you'll be needed to configure it to make it work as you expected.

All the best,
Alex


Post by johan.isaksson »

To clarify, a time resolution is required. Setting it to something tiny as you suggested is what I would recommend

Best regards,
Johan Isaksson

Post by syl »

Alright thanks!


Post Reply