Our pure JavaScript Scheduler component


Post by saramh »

Hello folks,

I'm developing a custom action that will change the height of the lane. For this I'm using the resourceMargin property mentioned here https://www.bryntum.com/products/scheduler/docs/api/Scheduler/model/mixin/ResourceModelMixin#field-resourceMargin. I'm providing a ResourceMarginConfig object to this property but has no effect.
If instead, I provide a number, the property will work as expected.
Here's a snippet of how my project looks like (in my config):

// other configurations
columns: [
{
	type: 'action',
	text: 'Actions',
	actions: [{
		cls: 'b-fa b-fa-plus',
		tooltip: 'My tooltip',
		onClick: (args: any) => {
			const { record, target } = args;
			//This is not working
			record.resourceMargin = {start: 0, end:100};
			
		// This works
		record.resourceMargin = 100;
	}}]
}
]

Once I inspect the type definitions of ResourceModelMixin, seems like the property only receives a number:

Capture.PNG
Capture.PNG (44.38 KiB) Viewed 79 times

There's no mention of this in the release notes https://bryntum.com/products/schedulerpro/changelog/. Could you please confirm on what version this is available? Thank you


Post by ghulam.ghous »

Hi there,

It is changed in version 5.6.0. Here's the ticket in which it is changed: https://github.com/bryntum/support/issues/6185. The version link: https://bryntum.com/products/schedulerpro/docs/guide/Scheduler/changelog#5-6-0-2023-10-26. Here's the changelog note:

It is now possible to use asymmetrical resourceMargin by assigning an object with start (margin top in horizontal mode, margin left in vertical mode) and end (margin bottom / margin right) properties

Regards,
Ghous


Post by saramh »

Oh I see, thanks a lot!


Post Reply