Page 3 of 3

Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 10:06 am
by swathi

Thank you Tasnim, Its working now.

But as I mentioned earlier, need to scroll to the y position as well (near resource)


Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 10:14 am
by tasnim

Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 11:13 am
by swathi

Yes, I had already checked with the above option. But wanted to check if we can pass y co-ordinate to the icon


Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 12:54 pm
by tasnim

Here is an example code snippet of how you can achieve it

        const el = scheduler.rowManager.rows[3].element; // the resource element
        icon.y = el.getBoundingClientRect().top;

Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 4:10 pm
by swathi

Hi,

Hidden with bryntum-widget is not working.

 <bryntum-widget hidden="true">

If I show the Icon initially (removing hidden attribute), then it's working correctly.
If I hide the icon initially, I am not able to show it again, though I am setting the hidden attribute to false.

this.icon.hidden = false;

Re: [ANGULAR] Need to show add arrow on click

Posted: Mon Aug 12, 2024 5:17 pm
by tasnim

Hi,

I see it's not working. Opened a ticket to fix it here https://github.com/bryntum/support/issues/9804

For now please use it this way

    ngAfterViewInit(): void {
        // SchedulerPro and Project instance
        this.schedulerPro = this.schedulerProComponent.instance;
        this.project = this.schedulerProProjectComponent.instance;
        this.icon = this.widgetComponent.instance;
        this.schedulerPro.zoomToLevel(13);

    // initially hide from the view
    this.icon.hidden = true;
}

async showArrow() {
    const date = new Date();
    await this.schedulerPro.scrollToDate(date)
    let a = this.schedulerPro.getCoordinateFromDate(date, false);
    this.icon.x = a;
    // show the icon
    this.icon.hidden = false;
}

Hope this helps now.

Best of luck :),
Tasnim


Re: [ANGULAR] Need to show add arrow on click

Posted: Tue Aug 13, 2024 4:43 pm
by swathi

This works. Thank you.