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 Premium Member
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    2
    Vote Rating
    0
    fastleansmart is on a distinguished road

      0  

    Question Unanswered: Problem with mouse events and custom composite sprites

    Unanswered: Problem with mouse events and custom composite sprites


    Hi,

    I'm working on an advanced drawing component, which extends "Ext.draw.Component" and shows different groups of sprites on a map. The surface holds several groups of composite sprites in its "groups" collection. Each group in this case is a custom class as well (extending "Ext.draw.CompositeSprite"), while each group contains a list of custom sprites (extending "Ext.draw.Sprite").
    Everything works fine, except for my desired mouse events. I'm trying to attach "click" and "mousemove" event handlers to each created sprite, but they are never called, because the corresponding events don't seem to fire.

    If I leave out my custom groups and add the sprites directly to the items collection of the component's surface, these problems disappear. But I definitely need my groups, inespecially to make it easier to execute common operations on groups of sprites (as described in the api docs) and to prevent the surface from adding composite sprites automatically to the surface, if they don't exist already (standard behaviour).

    It seems that the events aren't dispatched correctly when using composite sprites?
    Can everybody confirm this behaviour or give me a hint how to solve this?

    I'm using ExtJS 4.1.0
    Thanks in advance!

  2. #2
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    2
    Vote Rating
    0
    fastleansmart is on a distinguished road

      0  

    Default Ugly solution...

    Ugly solution...


    Hi,

    I found a dirty workaround to achieve my desired behaviour. I forward the component's mousedown event to my sprites. In the corresponding sprite event handler I filter by the event's target to determine, if the mousedown event was really "over" my sprite or over the underlying drawing surface. If it was, I stop the event, so it's not further dispatched to other components:

    Code:
    /* "sprite" is my custom Ext.draw.Sprite instance
    "this" is my custom Ext.draw.Component instance
    - in the api docs it's written that surface events are forwarded to the drawing component by default, so I can use "this" instead of "this.surface" */
    sprite.relayEvents(this, ['mousedown']);
    This solution seems to work in chrome and firefox, I haven't tried it in IE up to now. The disadvantage is that every fired mousedown event (even if it's far beyond any sprite's bounding rect) is caught by the sprite event handler. Does anyone know a better solution?

    Thank you.

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    75
    Vote Rating
    -1
    bareflix is an unknown quantity at this point

      0  

    Default Did you ever find a better solution to this? I think I'm seeing the same problem.

    Did you ever find a better solution to this? I think I'm seeing the same problem.


    I have an app that works with 4.0.2a, but with 4.1.1a the Sprite events are no longer delivered. Did you ever find a better solution? I seems like something is broken.

Thread Participants: 1

Tags for this Thread