[ka-Map-dev] [Bug 1571] New: kaMap.js removeObject not working for all objects

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Tue Aug 29 20:32:53 EDT 2006


           Summary: kaMap.js removeObject not working for all objects
           Product: ka-Map
           Version: 0.3
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: ka-map-dev at lists.maptools.org
        ReportedBy: brabec at gmail.com

Null argument should remove all objects. However, it only removes one due to the
'return' statement in the 'for' loop. 

Also, I recommend creating a new function for removing all objects from a given

kaMap.prototype.removeAllObjects = function(canvas) {
    for (var i=0; i<this.aObjects.length; i++) {
       obj = this.aObjects[i];
       if (obj.canvas && obj.canvas == canvas) {
          obj.canvas.removeChild( obj );
          obj.canvas = null;
    return true;

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.

More information about the ka-Map-dev mailing list