CalendarPanel Day View - infinite scroll when resizing event.

  1. #1

    CalendarPanel Day View - infinite scroll when resizing event.

    Hi all,

    First of all thanks for your hard work on the components, they're really great to work with.

    We have started using the CalendarPanel (previously we were using DayPilot).

    All is fine apart from resizing an event when the Day view has a scroll bar.

    Please see this video capture from your examples web site: https://www.youtube.com/watch?v=nvM9v_Q9kf4

    We were expecting the scroll to stop once it reaches midnight but it keeps going.

    Is there a way to fix / control this behaviour?

    Many thanks,

    John
  2. #2
    Hi @John,

    Welcome to the Ext.NET forums and thank you for the kind words!

    Please try this override:
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
        <script type="text/javascript">
            Ext.calendar.DragZone.override({
                alignElWithMouse: function (el, iPageX, iPageY) {
                    var oCoord = this.getTargetCoord(iPageX, iPageY);
                    var fly = el.dom ? el : Ext.fly(el, '_dd');
                    if (!this.deltaSetXY) {
                        var aCoord = [oCoord.x, oCoord.y];
                        fly.setXY(aCoord);
                        var newLeft = fly.getLeft(true);
                        var newTop = fly.getTop(true);
                        this.deltaSetXY = [newLeft - oCoord.x, newTop - oCoord.y];
                    } else {
                        fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]);
                    }
    
                    this.cachePosition(oCoord.x, oCoord.y);
                    //this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
    
                    this.proxy.sync();
    
                    return oCoord;
                }
            });
        </script>
    </head>
  3. #3

    Thanks

    Hi Daniil,

    First: Thanks for responding to our query so quickly.

    Second: Sorry for the long delay on responding.

    I just wanted to drop by and say thanks: your solution worked perfectly.

    Please mark this is as closed and have a good day.

    John

    Quote Originally Posted by Daniil View Post
    Hi @John,

    Welcome to the Ext.NET forums and thank you for the kind words!

    Please try this override:
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />
    
        <script type="text/javascript">
            Ext.calendar.DragZone.override({
                alignElWithMouse: function (el, iPageX, iPageY) {
                    var oCoord = this.getTargetCoord(iPageX, iPageY);
                    var fly = el.dom ? el : Ext.fly(el, '_dd');
                    if (!this.deltaSetXY) {
                        var aCoord = [oCoord.x, oCoord.y];
                        fly.setXY(aCoord);
                        var newLeft = fly.getLeft(true);
                        var newTop = fly.getTop(true);
                        this.deltaSetXY = [newLeft - oCoord.x, newTop - oCoord.y];
                    } else {
                        fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]);
                    }
    
                    this.cachePosition(oCoord.x, oCoord.y);
                    //this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth);
    
                    this.proxy.sync();
    
                    return oCoord;
                }
            });
        </script>
    </head>
  4. #4
    Thank you. It is always nice to get a confirmation that we actually helped.

Similar Threads

  1. [CLOSED] GridPanel - Infinite scroll not working
    By Arohan in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 26, 2014, 3:26 AM
  2. Replies: 5
    Last Post: Sep 30, 2013, 5:15 AM
  3. Replies: 1
    Last Post: May 02, 2012, 2:40 PM
  4. Replies: 9
    Last Post: Apr 18, 2012, 2:09 PM
  5. [CLOSED] CalendarPanel Remove time from event view
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Mar 28, 2012, 6:25 PM

Tags for this Thread

Posting Permissions