Our pure JavaScript Scheduler component


Post by pierrend »

Hello,

I am still working on my "mixed dependancies in one line" and we had an idea to make dependencies easier :
It would be cool if I can right click on an event, and clic on a button that will make appear only the dependencies for that event. (or hover)

But I've been trying to use these functions without success :
draw() => have an error "scheduler.draw is not a function"

(i am using const scheduler = schedulerRef.current.instance, since I'm with a React project)

drawDependency() => same error
drawForEvent(event) => same error

I have to say also that the documentation for these functions is pretty poor with no examples ! Do they take an id for parameter ? or an object ?

SO my question is : overall, do you have a method to draw only one precise dependency on a button clic ?

Thanks

Attachments
Screen Shot 2022-05-11 at 12.58.49 PM.png
Screen Shot 2022-05-11 at 12.58.49 PM.png (119.81 KiB) Viewed 421 times


Post by pierrend »

Thanks Mats, always the best idea!
it seems to work, but somehow, many other events are highlighted that have no dependancy at all with the one I clicked on ...
for example here I clicked on the red event of the bottom resource, but all the resources from the parent resource, which have a distinct ID and no dependancies, are highlighted too

Attachments
Screen Shot 2022-05-11 at 6.41.11 PM.png
Screen Shot 2022-05-11 at 6.41.11 PM.png (134.7 KiB) Viewed 410 times

Post by mats »

Can you please share your code? Ideally in the form of a small runnable test case so we can debug.


Post by pierrend »

Thank you Mats, I've just send you an email with the code without nodemodules and a hard written dataset.
the git branch is bryntumsend


Post by alex.l »

Hi pierrend,

I checked your code and found that the problem in eventRenderer code you use. I see you move events by your own with transform:translate and other not easy to read styling. I don't understand why did you do that and I don't know the business logic, but I can say that we cannot handle custom events positioning with our internal code. If you disable your renderer, you will see all works as expected.

Let us know if you have more information regarding your renderer.

All the best,
Alex


Post by pierrend »

Hello. Thank you Alex for your answer and checking our code. I'll see what I can do desactivating some of our customisations


Post by pierrend »

GOT IT Alex !
// renderData.style += z-index:100;border-radius:12px;opacity:0.9;;
\
I should never have forced opacity in the eventRenderer (and it's useless anyways, it should be in a CSS class). Then it overwrite all cSS opacity that you might have used for the highlightPredecessor functonality.

That's all :)


Post Reply