Bug Tracker

Modify

Ticket #1716 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Resizable helper is added to this.options.modifyThese on every drag-start.

Reported by: c_t Owned by:
Priority: major Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: Cc:
Blocking: Blocked by:

Description

I just realized that the resize-helper is added to the this.options.modifyThese array on every drag-start. I think from the performance point of view that's not good since the drag-function loops through this array and re-sets css-properties on drag. I see no use of setting the css property of the helper multiple times... Furthermore performance decreases with every additional resize...

My solution is to replace

		this.options.modifyThese.push([$(this.helper),0,0]);

with

			if ( this.options.modifyThese.length == 0 || !this.options.modifyThese[this.options.modifyThese.length-1][0].is('.ui-resizable') ) {
				this.options.modifyThese.push([$(this.helper),0,0]);
			}

in ui.resizables.js in the start-method.

Change History

comment:1 Changed 7 years ago by paul

  • Status changed from new to closed
  • Resolution set to fixed

D'oh! Thanks for finding this. Fixed!

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.