Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Sluggish mouseover effect tree/grid

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #11
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,607
    Vote Rating
    59
      0  

    Default

    I'll talk to Don some more about this. The 20ms setting feels about right. Have you tried it?

  2. #12
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,042
    Vote Rating
    182
      0  

    Default

    20 is decent, still doesn't feel like Chrome (any delay is noticeable).

    Btw, setting it to 0 produces an error...

  3. #13
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,607
    Vote Rating
    59
      0  

    Default

    That's a bug for sure. I'll create a ticket.

    Fix:

    Code:
    Ext.override(Ext.view.View, {
        afterRender: function(){
            var me = this,
                onMouseOverOut = me.mouseOverOutBuffer ? me.onMouseOverOut : me.handleMouseOverOrOut;
    
            me.callParent();
            me.mon(me.getTargetEl(), {
                scope: me,
                /*
                 * We need to make copies of this since some of the events fired here will end up triggering
                 * a new event to be called and the shared event object will be mutated. In future we should
                 * investigate if there are any issues with creating a new event object for each event that
                 * is fired.
                 */
                freezeEvent: true,
                click: me.handleEvent,
                mousedown: me.handleEvent,
                mouseup: me.handleEvent,
                dblclick: me.handleEvent,
                contextmenu: me.handleEvent,
                keydown: me.handleEvent,
                mouseover: onMouseOverOut,
                mouseout:  onMouseOverOut
            });
        }
    });

  4. #14
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,711
    Vote Rating
    240
      0  

    Default

    Reducing the buffer to 20ms seems to feel pretty good - the problem with no delay is that it actually creates a real CPU hit to try to keep up with every mousemove. The delay was added because users on (cough) IE (cough) reported the CPU spike. We'll see how the new delay feels.

    Of course you (or someone else reading this) can override this in your app

    Code:
    Ext.define('MyApp.patches.view.View', {
        target: 'Ext.view.View',
    
        mouseOverOutBuffer: 0
    });
    Thanks for reporting it - let us know how the smaller buffer value feels?
    Don Griffin
    Director of Engineering - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  5. #15
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,711
    Vote Rating
    240
      0  

    Default

    I see my window was stale when I posted my response :P

    I guess we just need an Ext.support.EyeCandy feature detector
    Don Griffin
    Director of Engineering - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  6. #16
    Sencha User
    Join Date
    Jun 2008
    Posts
    138
    Vote Rating
    7
      0  

    Default

    Quote Originally Posted by Animal View Post
    Well that's possible. But trackMouseOver adds a class and fires events which form part of an API which is in wide use.

    If all you need in your app is a hover state, then you could use

    Code:
        trackMouseOver: false
    and add

    Code:
    .x-grid-row:hover .x-grid-cell {
        background-color: whatever;
    }
    This doesn't work for locking grids since there's two separate grids...

  7. #17
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    145
      1  

    Default

    The :hover approach will make IE7 truly suffer.
    Aaron Conran
    @aconran

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •