From cbda2f35ae18b10d2ca1904af9b2d156dc909b2b Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Thu, 3 Jul 2008 14:01:24 +0000 Subject: [PATCH] droppable: a small performance improvement by not using :visible, and deferring to a simpler syntax of checking for diplay none (fixed bool) --- ui/ui.droppable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index 5f208afa3..6d3e159fa 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -179,7 +179,7 @@ $.ui.ddmanager = { 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.css("display") == "none"; 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 }; -- 2.39.5