Show a message on the History Panel if the feature is new

(closes #4975)
This commit is contained in:
Bryan Housel
2018-04-09 14:33:39 -04:00
parent b09c712fc5
commit f9c1cbf6bc
3 changed files with 11 additions and 2 deletions
+9 -2
View File
@@ -96,8 +96,8 @@ export function uiPanelHistory(context) {
function redraw(selection) {
var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); }),
singular = selected.length === 1 ? selected[0] : null;
var selected = _filter(context.selectedIDs(), function(e) { return context.hasEntity(e); });
var singular = selected.length === 1 ? selected[0] : null;
osm = context.connection();
@@ -112,6 +112,13 @@ export function uiPanelHistory(context) {
var entity = context.entity(singular);
if (!entity.version) {
selection
.append('div')
.text(t('info_panels.history.no_history'));
return;
}
var list = selection
.append('ul');