Skip to content

Commit cbda2f3

Browse files
author
Paul Bakaus
committed
droppable: a small performance improvement by not using :visible, and deferring to a simpler syntax of checking for diplay none (fixed bool)
1 parent 9c2e67c commit cbda2f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/ui.droppable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ $.ui.ddmanager = {
179179

180180
for (var i = 0; i < m.length; i++) {
181181
if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element,(t.currentItem || t.element)))) continue;
182-
m[i].visible = m[i].element.css("display") == "none"; if(!m[i].visible) continue; //If the element is not visible, continue
182+
m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
183183
m[i].offset = m[i].element.offset();
184184
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
185185

0 commit comments

Comments
 (0)