From 66e1bdb47dcbc1450f2eb81193a221228fe596b2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 14 Mar 2013 15:59:40 -0700 Subject: [PATCH] Show tag editor for untagged entities that aren't new Fixes #991. --- js/id/core/entity.js | 4 ++++ js/id/modes/select.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/js/id/core/entity.js b/js/id/core/entity.js index 0aaa36907..a71f1a8ed 100644 --- a/js/id/core/entity.js +++ b/js/id/core/entity.js @@ -63,6 +63,10 @@ iD.Entity.prototype = { return iD.Entity.id.toOSM(this.id); }, + isNew: function() { + return this.osmId() < 0; + }, + update: function(attrs) { return iD.Entity(this, attrs); }, diff --git a/js/id/modes/select.js b/js/id/modes/select.js index 8f24aca35..3570e5a4c 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -4,7 +4,7 @@ iD.modes.Select = function(context, selection, initial) { button: 'browse' }; - var showgrid = singular() && !_.without(Object.keys(singular().tags), 'area').length; + var showgrid = singular() && singular().isNew() && _.without(Object.keys(singular().tags), 'area').length === 0; var inspector = iD.ui.Inspector(context).initial(showgrid), keybinding = d3.keybinding('select'),