Changeset 7584
- Timestamp:
- 07/29/08 10:52:48 (4 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Events.js (modified) (3 diffs)
- trunk/openlayers/lib/OpenLayers/Map.js (modified) (1 diff)
- trunk/openlayers/tests/Map.html (modified) (2 diffs)
- trunk/openlayers/theme/default/style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Events.js
r6832 r7584 407 407 this.object = object; 408 408 this.element = element; 409 this.eventTypes = eventTypes;410 409 this.fallThrough = fallThrough; 411 410 this.listeners = {}; … … 417 416 ); 418 417 418 this.eventTypes = []; 419 419 420 // if eventTypes is specified, create a listeners list for each 420 421 // custom application event. 421 if ( this.eventTypes != null) {422 for (var i = 0; i < this.eventTypes.length; i++) {423 this.addEventType( this.eventTypes[i]);422 if (eventTypes != null) { 423 for (var i = 0; i < eventTypes.length; i++) { 424 this.addEventType(eventTypes[i]); 424 425 } 425 426 } … … 455 456 * Parameters: 456 457 * eventName - {String} 458 * dontAddMe - {Boolean} 457 459 */ 458 460 addEventType: function(eventName) { 459 461 if (!this.listeners[eventName]) { 460 462 this.listeners[eventName] = []; 463 464 this.eventTypes.push(eventName); 461 465 } 462 466 }, trunk/openlayers/lib/OpenLayers/Map.js
r7374 r7584 405 405 406 406 this.div = OpenLayers.Util.getElement(div); 407 OpenLayers.Element.addClass(this.div, 'olMap'); 407 408 408 409 // the viewPortDiv is the outermost div we modify trunk/openlayers/tests/Map.html
r7374 r7584 8 8 9 9 function test_Map_constructor (t) { 10 t.plan( 1 0);10 t.plan( 11 ); 11 11 12 12 map = new OpenLayers.Map('map'); … … 15 15 {map: "/mapdata/vmap_wms.map", layers: "basic"}); 16 16 map.addLayer(baseLayer); 17 18 t.ok( OpenLayers.Element.hasClass(map.div, "olMap"), "Map div has olMap class"); 17 19 18 20 t.ok( map instanceof OpenLayers.Map, "new OpenLayers.Map returns object" ); trunk/openlayers/theme/default/style.css
r7576 r7584 1 div.olMap { 2 padding: 0px!important; 3 margin: 0px!important; 4 } 5 1 6 div.olMapViewport { 2 7 text-align: left;
