aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.droppable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-07-03 13:05:30 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-07-03 13:05:30 +0000
commit6aaf1598d2403466f6d94a95fa03858f6daf4134 (patch)
treedd1025ee5f7f1b44d7257bb26695bd2baacf04f1 /ui/ui.droppable.js
parent6e7572309a6c48e129f8fa0906b959c78a8f202d (diff)
downloadjquery-ui-6aaf1598d2403466f6d94a95fa03858f6daf4134.tar.gz
jquery-ui-6aaf1598d2403466f6d94a95fa03858f6daf4134.zip
droppable: a small performance improvement by not using :visible, and deferring to a simpler syntax of checking for diplay none
Diffstat (limited to 'ui/ui.droppable.js')
-rw-r--r--ui/ui.droppable.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js
index b8bac826e..5f208afa3 100644
--- a/ui/ui.droppable.js
+++ b/ui/ui.droppable.js
@@ -176,9 +176,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].visible = m[i].element.css("display") == "none"; 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[0].offsetWidth, height: m[i].element[0].offsetHeight };
@@ -210,6 +211,7 @@ $.ui.ddmanager = {
if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, e);
//Run through all droppables and check their positions based on specific tolerance options
+
$.each($.ui.ddmanager.droppables, function() {
if(this.options.disabled || this.greedyChild || !this.visible) return;