Ticket #1555: NavigationHistory.css_sprites.00.patch
| File NavigationHistory.css_sprites.00.patch, 4.5 kB (added by fredj, 8 months ago) |
|---|
-
theme/default/style.css
old new 128 128 position: relative; 129 129 } 130 130 131 .olControlNavigationHistory PreviousItemActive {132 background-image: url("img/ view_previous_on.png");131 .olControlNavigationHistory { 132 background-image: url("img/navigation_history.png"); 133 133 background-repeat: no-repeat; 134 134 width: 24px; 135 135 height: 24px; 136 136 137 } 138 .olControlNavigationHistoryPreviousItemActive { 139 background-position: 0px 0px; 140 } 137 141 .olControlNavigationHistoryPreviousItemInactive { 138 background-image: url("img/view_previous_off.png"); 139 background-repeat: no-repeat; 140 width: 24px; 141 height: 24px; 142 background-position: 0px -24px; 142 143 } 143 144 .olControlNavigationHistoryNextItemActive { 144 background-image: url("img/view_next_on.png"); 145 background-repeat: no-repeat; 146 width: 24px; 147 height: 24px; 145 background-position: -24px 0px; 148 146 } 149 147 .olControlNavigationHistoryNextItemInactive { 150 background-image: url("img/view_next_off.png"); 151 background-repeat: no-repeat; 152 width: 24px; 153 height: 24px; 148 background-position: -24px -24px; 154 149 } 155 150 156 151 .olControlNavToolbar .olControlNavigationItemActive { -
lib/OpenLayers/Control/NavigationHistory.js
old new 137 137 138 138 var previousOptions = { 139 139 trigger: OpenLayers.Function.bind(this.previousTrigger, this), 140 displayClass: this.displayClass + " Previous"140 displayClass: this.displayClass + " " + this.displayClass + "Previous" 141 141 }; 142 142 OpenLayers.Util.extend(previousOptions, this.previousOptions); 143 143 this.previous = new OpenLayers.Control.Button(previousOptions); 144 144 145 145 var nextOptions = { 146 146 trigger: OpenLayers.Function.bind(this.nextTrigger, this), 147 displayClass: this.displayClass + " Next"147 displayClass: this.displayClass + " " + this.displayClass + "Next" 148 148 }; 149 149 OpenLayers.Util.extend(nextOptions, this.nextOptions); 150 150 this.next = new OpenLayers.Control.Button(nextOptions); -
examples/navigation-history.html
old new 17 17 <script type="text/javascript"> 18 18 var map, nav, panel; 19 19 20 // preload images if you care 21 var preload = [ 22 "../theme/default/img/view_previous_on.png", 23 "../theme/default/img/view_next_on.png" 24 ]; 25 var img = new Array(preload.length); 26 for(var i=0; i<preload.length; ++i) { 27 img[i] = new Image(); 28 img[i].src = preload[i]; 29 } 30 31 function init(){ 20 function init() { 32 21 map = new OpenLayers.Map('map'); 33 22 34 23 nav = new OpenLayers.Control.NavigationHistory(); … … 48 37 ); 49 38 map.addLayer(layer); 50 39 map.zoomToMaxExtent(); 51 52 53 40 } 54 41 </script> 55 42 </head>
