diff options
author | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-07-02 17:38:34 +0000 |
---|---|---|
committer | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-07-02 17:38:34 +0000 |
commit | a14c917e8e2986c3f8852e4d6f7b2c842aef1674 (patch) | |
tree | e23750c4a57c2edf3db9679d6f63235e5108c7f6 /ui/ui.droppable.js | |
parent | c400e02621bb5a97d2028d86c946f3778ff2c9db (diff) | |
download | jquery-ui-a14c917e8e2986c3f8852e4d6f7b2c842aef1674.tar.gz jquery-ui-a14c917e8e2986c3f8852e4d6f7b2c842aef1674.zip |
Dropabble minor performance changes
Diffstat (limited to 'ui/ui.droppable.js')
-rw-r--r-- | ui/ui.droppable.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index d668a1c0b..b8bac826e 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -28,7 +28,7 @@ $.widget("ui.droppable", { }); //Store the droppable's proportions - this.proportions = { width: this.element.outerWidth(), height: this.element.outerHeight() }; + this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; // Add the reference and positions to the manager $.ui.ddmanager.droppables.push(this); @@ -177,11 +177,10 @@ $.ui.ddmanager = { var m = $.ui.ddmanager.droppables; var type = e ? e.type : null; // workaround for #2317 for (var i = 0; i < m.length; i++) { - if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue; m[i].visible = m[i].element.is(":visible"); if(!m[i].visible) continue; //If the element is not visible, continue m[i].offset = m[i].element.offset(); - m[i].proportions = { width: m[i].element.outerWidth(), height: m[i].element.outerHeight() }; + m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; if(type == "dragstart" || type == "sortactivate") m[i].activate.call(m[i], e); //Activate the droppable if used directly from draggables } |