Ticket #1041: collection.patch
| File collection.patch, 1.3 kB (added by tschaub, 1 year ago) |
|---|
-
lib/OpenLayers/Geometry/Collection.js
old new 288 288 */ 289 289 equals: function(geometry) { 290 290 var equivalent = true; 291 if(!geometry.CLASS_NAME || (this.CLASS_NAME != geometry.CLASS_NAME)) { 291 if(!geometry || !geometry.CLASS_NAME || 292 (this.CLASS_NAME != geometry.CLASS_NAME)) { 292 293 equivalent = false; 293 294 } else if(!(geometry.components instanceof Array) || 294 295 (geometry.components.length != this.components.length)) { -
tests/Geometry/test_Collection.html
old new 132 132 t.eq(coll.bounds.top, 70, "good top bounds"); 133 133 } 134 134 135 function test_Collection_equals(t) { 136 t.plan(1); 137 var geom = new OpenLayers.Geometry.Collection(); 138 t.ok(!geom.equals(), "collection.equals() returns false for undefined"); 139 } 140 135 141 function test_07_Collection_addComponent(t) { 136 142 t.plan(10); 137 143
