From f385ea4e974d240025f4fbde5761010ef807700c Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Wed, 4 Jul 2012 12:36:43 +0100 Subject: [PATCH] modified notification markers, so that a trigger function can be named that will prevent the notification from happening --- WebContent/base/osrm/OSRM.Marker.js | 2 +- WebContent/gui/OSRM.Timers.js | 34 +++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/WebContent/base/osrm/OSRM.Marker.js b/WebContent/base/osrm/OSRM.Marker.js index 8f2185f3e..9ab1377c1 100644 --- a/WebContent/base/osrm/OSRM.Marker.js +++ b/WebContent/base/osrm/OSRM.Marker.js @@ -99,7 +99,7 @@ onDrag: function(e) { OSRM.Geocoder.updateLocation( this.parent.label ); }, onDragStart: function(e) { - OSRM.GUI.clear_timeout(0); + //OSRM.GUI.clear_timeout(0); OSRM.G.dragging = true; this.switchIcon(this.options.dragicon); diff --git a/WebContent/gui/OSRM.Timers.js b/WebContent/gui/OSRM.Timers.js index b0c54a83d..19224d06f 100644 --- a/WebContent/gui/OSRM.Timers.js +++ b/WebContent/gui/OSRM.Timers.js @@ -23,34 +23,50 @@ OSRM.GUI.extend( { // notifications notifications: [ - { time:30000, + { time: 30000, header: "[Tooltip] Clicking and Dragging", body: "You can simply click on the map to set source and target markers. " + "Then you can continue and drag the markers over the map or create. " + "

" + "You can even create additional markers by dragging them off of the main route." + - "Markers can be simply deleted by clicking on them." + "Markers can be simply deleted by clicking on them.", + _class: "Routing", + _func: "getRoute_Dragging" } ], -// init +// initialize notification timers init: function() { // init variables var notifications = OSRM.GUI.notifications; OSRM.G.notification_timers = new Array( notifications.length ); // init timers - for( var i=0, iEnd=notifications.length; i