1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    22
    Vote Rating
    0
    lee el is on a distinguished road

      0  

    Default Answered: Mouseover event on a panel

    Answered: Mouseover event on a panel


    Hi,

    I am trying to capture a mouseover event on a panel.
    my panel has an image on one side and a label on the other side (Hbox layout).
    my code is as follows:
    ....
    Code:
    items: [                            {
                                    xtype: 'image',
                                    src: 'resources/ext/resources/css/images/mostActivePanel/ma_lines.png'
                                },
                                {
                                    xtype: 'label',
                                    forId: 'myFieldId',
                                    text: 'Lines',
                                    margin: '0 0 0 10'
                                }
                                ],
                                 listeners: {
                                     element: 'body',
                                    mouseover:function(e,t,eOpt) {
                                                console.log('mouseover was called'); 
                                                      }
    The problem I see is when the mouse is moving over the panel the mouse over method is called but when I continue to move on the panel itself to the image I get another call to the method.(same for label).

    what I am trying to achieve is that the method will be called only once when the mouse is over the panel no matter where and to avoid getting multiple calls to the method when the mouse moves on items of the panel

    thanks for your help,
    Lee

  2. I think you may be looking for mouseenter rather than mouseover.

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,332
    Answers
    124
    Vote Rating
    83
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    I think you may be looking for mouseenter rather than mouseover.

  5. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    22
    Vote Rating
    0
    lee el is on a distinguished road

      0  

    Default Changing to mouseenter solved the problem

    Changing to mouseenter solved the problem


    Hi,

    Changing to mouseover to mouseenter solved the problem!

    thanks for the help,
    Lee

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar