Skip to content

Conversation

ghostd
Copy link

@ghostd ghostd commented Nov 12, 2011

The position (offset and width/height) computation is only used by the '_mouseDrag' method. So, by moving the computation in '_mouseStart' method:

  • we are removing useless (and sometimes slow on big selectable) computations from widget initialization
  • we are computing the position for all 'selectees' in one shot and using the browser cache: since we are not changing the render (by adding/removing CSS class) between the different calls to offset/outerWidth/outerHeight, the browser does not need recompute the render and can cache some results

…lectees

The position (offset and width/height) computation is only used by the '_mouseDrag' method. So, by moving the computation in '_mouseStart' method:
- we are removing useless (and sometimes slow on big selectable) computations from widget initialization
- we are computing the position for all 'selectees' in one shot and using the browser cache: since we are not changing the render (by adding/removing CSS class) between the different calls to offset/outerWidth/outerHeight, the browser does not need recompute the render and can cache some results
@scottgonzalez
Copy link
Member

The refresh method should be able to be called at any time, including during a selection. This breaks that functionality by clearing the data on refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants