Skip to content
Permalink
Browse files

Droppable: short _init code.

  • Loading branch information...
chicheng committed Mar 5, 2009
1 parent 73163f4 commit 7e8ea7a36a14167a371d8a1df31503c95fa3e855
Showing with 4 additions and 4 deletions.
  1. +4 −4 ui/ui.droppable.js
@@ -20,18 +20,18 @@ $.widget("ui.droppable", {
var o = this.options, accept = o.accept;
this.isover = 0; this.isout = 1;

this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) {
this.options.accept = accept && $.isFunction(accept) ? accept : function(d) {
return d.is(accept);
};

//Store the droppable's proportions
this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };

// Add the reference and positions to the manager
$.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || [];
$.ui.ddmanager.droppables[this.options.scope].push(this);
$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
$.ui.ddmanager.droppables[o.scope].push(this);

(this.options.addClasses && this.element.addClass("ui-droppable"));
(o.addClasses && this.element.addClass("ui-droppable"));

},

0 comments on commit 7e8ea7a

Please sign in to comment.
You can’t perform that action at this time.