- gui animations no longer trigger an onEndTransition event on loading

- refactored control management (handle is stored with map)
- refactored inactive control buttons (no background change)
- added localization strings for zooming and default search engine
- renaming: OSRM.MapView -> OSRM.Control.Map
This commit is contained in:
DennisSchiefer
2012-08-27 16:24:37 +01:00
parent 6dcea6d808
commit 794140711d
27 changed files with 243 additions and 109 deletions
-1
View File
@@ -99,7 +99,6 @@ $showBox: function() {
this._box.style.visibility="visible";
this._handle.style.visibility="hidden";
this._box.style[this._side]="5px";
this._transitionEndFct();
},
$hideBox: function() {
this._box_visible = false;
+4 -6
View File
@@ -71,10 +71,8 @@ setLabels: function() {
document.getElementById('config-handle-icon').title = OSRM.loc("GUI_CONFIGURATION");
document.getElementById('mapping-handle-icon').title = OSRM.loc("GUI_MAPPING_TOOLS");
document.getElementById('main-handle-icon').title = OSRM.loc("GUI_MAIN_WINDOW");
document.getElementById('gui-locations-route').title = OSRM.loc("GUI_ZOOM_ON_ROUTE");
document.getElementById('gui-locations-user').title = OSRM.loc("GUI_ZOOM_ON_USER");
document.getElementById('gui-zoom-in').title = OSRM.loc("GUI_ZOOM_IN");
document.getElementById('gui-zoom-out').title = OSRM.loc("GUI_ZOOM_OUT");
OSRM.G.map.zoomControl.setTooltips( OSRM.loc("GUI_ZOOM_IN"), OSRM.loc("GUI_ZOOM_OUT") );
OSRM.G.map.locationsControl.setTooltips( OSRM.loc("GUI_ZOOM_ON_USER"), OSRM.loc("GUI_ZOOM_ON_ROUTE") );
OSRM.GUI.setDistanceFormatsLanguage();
OSRM.GUI.setRoutingEnginesLanguage();
},
@@ -87,11 +85,11 @@ clearResults: function() {
// reposition and hide zoom controls before main box animation
beforeMainTransition: function() {
OSRM.Control.Zoom.prototype.hide();
OSRM.G.map.zoomControl.hide();
},
// show zoom controls after main box animation
afterMainTransition: function() {
OSRM.Control.Zoom.prototype.show();
OSRM.G.map.zoomControl.show();
},
// distance format routines
+2 -2
View File
@@ -46,11 +46,11 @@ init: function() {
// toggle GUI features that need a route to work
activateRouteFeatures: function() {
OSRM.Printing.activate();
OSRM.Control.Locations.prototype.activate('gui-locations-route');
OSRM.G.map.locationsControl.activateRoute();
},
deactivateRouteFeatures: function() {
OSRM.Printing.deactivate();
OSRM.Control.Locations.prototype.deactivate('gui-locations-route');
OSRM.G.map.locationsControl.deactivateRoute();
},
// click: button "reset"