Changeset 2840
- Timestamp:
- 03/21/07 16:31:42 (2 years ago)
- Files:
-
- sandbox/elemoine/openlayers/examples/history.html (modified) (1 diff)
- sandbox/elemoine/openlayers/lib/OpenLayers/Control/History.js (modified) (1 diff)
- sandbox/elemoine/openlayers/theme/default/img/left_arrow.png (added)
- sandbox/elemoine/openlayers/theme/default/img/right_arrow.png (added)
- sandbox/elemoine/openlayers/theme/default/style.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/elemoine/openlayers/examples/history.html
r2813 r2840 23 23 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); 24 24 25 OpenLayers.History.getInstance().activate(); 25 var hist = new OpenLayers.Control.History(); 26 map.addControl(hist); 27 hist.activate(); 26 28 } 27 29 sandbox/elemoine/openlayers/lib/OpenLayers/Control/History.js
r2810 r2840 10 10 OpenLayers.Control.History = OpenLayers.Class.create(); 11 11 OpenLayers.Control.History.prototype = 12 OpenLayers.Class.inherit( OpenLayers.Control, { 12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 14 initialize: function() { 15 OpenLayers.Control.Panel.prototype.initialize.apply(this, [{displayClass: "olControlHistory"}]); 16 }, 13 17 14 18 activate: function() { 15 var history = OpenLayers.History.getInstance(); 16 history.activate(); 19 OpenLayers.History.getInstance().activate(); 17 20 return OpenLayers.Control.prototype.activate.apply(this,arguments); 18 21 }, 19 22 20 23 deactivate: function() { 21 var history = OpenLayers.History.getInstance(); 22 history.deactivate(); 24 OpenLayers.History.getInstance().deactivate(); 23 25 return OpenLayers.Control.prototype.deactivate.apply(this,arguments); 24 },25 26 draw: function() {27 history.deactivate();28 this.activate();29 26 }, 30 27 sandbox/elemoine/openlayers/theme/default/style.css
r2803 r2840 23 23 display: block; 24 24 position: absolute; 25 } 25 } 26 .olControlHistory { 27 right: 3px; 28 display: block; 29 position: absolute; 30 bottom: 0em; 31 } 26 32 27 33 div.olControlMousePosition { … … 88 94 } 89 95 96 90 97 .olControlNavToolbar .olControlNavigationItemActive { 91 98 background-image: url("img/panning-hand-on.png");
