Changeset 576

Show
Ignore:
Timestamp:
01/26/06 13:44:55 (3 years ago)
Author:
therve@gmail.com
Message:

Add basic tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/branches/scriptaculous/MochiKit/DragAndDrop.js

    r574 r576  
    7979    register: function (drop) { 
    8080        this.drops.push(drop); 
     81    }, 
     82 
     83    unregister: function (drop) { 
     84        this.drops = MochiKit.Base.filter(function (d) { 
     85            return d != drop; 
     86        }, this.drops); 
    8187    }, 
    8288 
     
    249255    }, 
    250256 
     257    destroy: function () { 
     258        /*** 
     259 
     260        Delete this droppable. 
     261 
     262        ***/ 
     263        MochiKit.DragAndDrop.Droppables.unregister(this); 
     264    }, 
     265 
    251266    repr: function () { 
    252267        return '[' + this.__class__.NAME + ", options:" + MochiKit.Base.repr(this.options) + "]"; 
     
    278293    unregister: function (draggable) { 
    279294        this.drags = MochiKit.Base.filter(function (d) { 
    280             return d != draggable 
     295            return d != draggable; 
    281296        }, this.drags); 
    282297        if (this.drags.length === 0) {