Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    37
    Vote Rating
    1
    y0y is on a distinguished road

      0  

    Cool [FEATREQ] [3.0rc1] Ext.DD constrainTo does not take into account container borders

    [FEATREQ] [3.0rc1] Ext.DD constrainTo does not take into account container borders


    The constrainTo method for Ext.DD does not take into account its containers borders. Thus, if the container has a border, you can drag an element over top of the border on the top and left sides, but on the bottom and right sides you are constrained X pixels from the edge where X is the width of the border.

    Here is an example:

    Code:
    <html>
    <head>
    <style>
    #test {
        background: #FDFDFD;
        border: 1px solid #D0D0D0;    
        width: 400px;
        height: 300px;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -150px;
        margin-left: -200px;
    }
    
    #container {
        border: 3px solid red;
        width: 650px;
        height: 500px;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -325px;
        margin-left: -250px;
    }
    </style>
    <link rel="stylesheet" type="text/css" href="PATH_TO_EXT_ALL_CSS" />
    <script type="text/javascript" src="PATH_TO_EXT_ALL"></script>
    <script type="text/javascript">
    Ext.onReady(function() {
        var dragger = new Ext.dd.DD(Ext.get('test'));
        dragger.startDrag = function() {
            this.constrainTo(Ext.get('container'));
        }
    });
    </script>
    <body>
    <div id="container">
        <div id="test"></div>
    </div>
    </body>
    </html>
    By dragging the inner div to the edges, you can see it is offset 3px from the bottom and right because of the 3px border, while on the top and left it actually goes over top of the border.

    I do not currently have a fix for this.

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    37
    Vote Rating
    1
    y0y is on a distinguished road

      0  

    Default


    The fix for this one looks pretty simple. I've only tested it within my use-case, however. There may be others I haven't considered.

    Line 536 of DDCore.js is currently:

    Code:
    c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight};
    it should be changed to

    Code:
    c = {x : xy[0]+s.left+ce.getBorderWidth('l'), y: xy[1]+s.top+ce.getBorderWidth('t'), width: cd.clientWidth, height: cd.clientHeight};

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    37
    Vote Rating
    1
    y0y is on a distinguished road

      0  

    Default


    it should be noted that my fix assumes that we don't want the border to be included in the allowable area. This is what I would expect.

    I would suggest if you are thinking of making it otherwise, that it be a config parameter of some sort.