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.

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Toronto
    Posts
    7
    Vote Rating
    0
    jmacfarlane is on a distinguished road

      0  

    Default getDragData - getTarget parameters

    getDragData - getTarget parameters


    I am building a drag/drop for a grid panel using DragZone. The issue I am having is that when I drag the scroll bar I drag the whole grid instead of scrolling.

    I've made a work-around where I'm checking for the class name of the dragged item in getDragData, which I don't believe is the correct method for doing so.

    One this that is confusing, and I have searched for quite a while for an example or documentation, is the numeric value in this statement. What is the "10" for and is that the cause of this problem?

    HTML Code:
    var sourceEl = e.getTarget(v.itemSelector,10);

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,474
    Vote Rating
    280
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    The documentation for getTarget() can be found here:

    http://dev.sencha.com/deploy/ext-3.4...xt.EventObject

    It doesn't explain the details so I'll have a quick go.

    When adding event listeners to the DOM it is quite inefficient to add them to all HTML elements in a component. Instead you can just add a single listener to one of the elements higher up, and the event will propagate up to that element. But in a structure like a grid or a tree, you still need to establish exactly which item (a row or a tree node) was clicked on.

    Calling getTarget() will tell you which HTML element was clicked on but that isn't always what you want. Usually there is some sort of wrapper element for each item (be it a tree node or a grid row or whatever) and it is this wrapper element that you need to identify which item was clicked. The first argument passed to getTarget() is a CSS selector that will be used to walk up the DOM from the clicked element until it finds an element that matches the selector.

    The second argument to getTarget() is a depth. It specifies how many elements should be tested against the CSS selector before giving up. I believe this is done purely for performance reasons. The default is 10.

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    1
    Vote Rating
    0
    mjuarros is on a distinguished road

      0  

    Default


    Have you solved your issue with the scrollbars? I have a similar issue.
    thanks in advance

Thread Participants: 2

Tags for this Thread