indicate recalculation request by changing segment color (mark old);

in addition to or instead of loading spinner (#3)?
This commit is contained in:
Norbert Renner 2014-05-29 20:44:12 +02:00
parent e187be8b29
commit 9279913d36

View file

@ -69,4 +69,12 @@ BR.Routing = L.Routing.extend({
add();
}
,_routeSegment: function(m1, m2, cb) {
// change segment color before request to indicate recalculation (mark old)
if (m1 && m1._routing.nextLine !== null) {
m1._routing.nextLine.options.color = 'dimgray';
m1._routing.nextLine._updateStyle();
}
L.Routing.prototype._routeSegment.call(this, m1, m2, cb);
}
});