Our pure JavaScript Scheduler component


Post by alex.l »

you don't answer to my question

From docs here https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/ScheduleTooltip

Feature that displays a tooltip containing the time at the mouse position when hovering empty parts of the schedule.

ScheduleTooltip feature extends Tooltip and applies own logic to manage it.
It works as it should in bounds of feature goals.
If you need to have a tooltip attached to custom element with custom content, you need to implement your own based on docs I shared.
So the answer is - it doesn't work because it's not designed to be used like that.

All the best,
Alex


Post by frederick45 »

you still haven’t answered my question

        this.Drag = new bryntum.scheduler.DragHelper (
            {

            cloneTarget        : true,
            mode               : 'translateXY',               
            dropTargetSelector : '.b-timeline-subgrid',
            targetSelector     : '.b-grid-row:not(.b-group-row)',

            grid               : this.UnplannedGrid,
            schedule           : this.scheduler,
            constrain          : false,
            outerElement       : this.UnplannedGrid.element,
            
            afterConstruct() {
                // Configure DragHelper with schedule's scrollManager to allow scrolling while dragging
                this.scrollManager = this.schedule.scrollManager;
            },
            
            createProxy(element) {
                const
                    proxy        = document.createElement('div'),
                    task         = this.grid.getRecordFromElement(element),
                    durationInPx = this.schedule.timeAxisViewModel.getDistanceForDuration(task.duration);


                // Fake an event bar
                proxy.classList.add('b-sch-event-wrap', 'b-sch-event', 'b-unassigned-class', `b-sch-${this.schedule.mode}`);
                proxy.innerHTML = `<div class="b-sch-event b-has-content b-sch-event-withicon">
                    <div class="b-sch-event-content">
                        <i class="${task.iconCls}"></i> ${task.name}
                    </div>
                </div>`;

                proxy.style.height = `${this.schedule.rowHeight - (2 * this.schedule.resourceMargin)}px`;
                proxy.style.width  = `${durationInPx}px`;

                return proxy;
            },

the durationInPx value is ok, but :

                    proxy.style.height = `${this.schedule.rowHeight - (2 * this.schedule.resourceMargin)}px`;
                    proxy.style.width  = `${durationInPx}px`;

does'nt work


Post by alex.l »

Sorry if I didn't get your problem, I am not sure I follow this topic.
You asked about schedule tooltip feature and now the problem we are talking about is wrong calculation of durationInPx.

Please collect all in once in 1 reply:

  1. The test case I can run to reproduce/debug
  2. Steps to reproduce
  3. Actual result
  4. Expected result
  5. Extra questions regarding to the problem

All the best,
Alex


Post Reply