Keep buttons active during all phases. Fixes #200

This commit is contained in:
Tom MacWright
2012-12-05 18:36:34 -05:00
parent 80b15dd9a6
commit 3f97ca10c5
7 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ window.iD = function(container) {
.on('click', function (mode) { controller.enter(mode); });
controller.on('enter', function (entered) {
buttons.classed('active', function (mode) { return entered === mode; });
buttons.classed('active', function (mode) { return entered.button === mode.button; });
});
var undo_buttons = bar.append('div')
+1
View File
@@ -1,6 +1,7 @@
iD.modes.AddArea = function() {
var mode = {
id: 'add-area',
button: 'area',
title: '+ Area',
description: 'Add parks, buildings, lakes, or other areas to the map.'
};
+1
View File
@@ -1,6 +1,7 @@
iD.modes.AddRoad = function() {
var mode = {
id: 'add-road',
button: 'road',
title: '+ Road',
description: 'Roads can be highways, streets, pedestrian paths, or even canals'
};
+1
View File
@@ -1,5 +1,6 @@
iD.modes.Browse = function() {
var mode = {
button: 'browse',
id: 'browse',
title: 'Browse',
description: 'Pan and zoom the map'
+3 -1
View File
@@ -1,5 +1,7 @@
iD.modes.DrawArea = function(way_id) {
var mode = {};
var mode = {
button: 'area'
};
mode.enter = function() {
+3 -1
View File
@@ -1,5 +1,7 @@
iD.modes.DrawRoad = function(way_id, direction) {
var mode = {};
var mode = {
button: 'road'
};
mode.enter = function() {
mode.map.dblclickEnable(false);
+3 -1
View File
@@ -1,5 +1,7 @@
iD.modes.Select = function (entity) {
var mode = {},
var mode = {
button: ''
},
inspector = iD.Inspector(),
dragging, target;