Hide account/logout when embedded (fixes #1229)

This commit is contained in:
John Firebaugh
2013-04-15 11:28:58 -07:00
parent 115ed4b4bb
commit 5e354018a8
2 changed files with 12 additions and 3 deletions
+7
View File
@@ -148,6 +148,13 @@ window.iD = function () {
}));
}
var embed = false;
context.embed = function(_) {
if (!arguments.length) return embed;
embed = _;
return context;
};
return d3.rebind(context, dispatch, 'on');
};
+5 -3
View File
@@ -78,9 +78,11 @@ iD.ui = function(context) {
var about = container.append('div')
.attr('class','col12 about-block fillD');
about.append('div')
.attr('class', 'account')
.call(iD.ui.Account(context));
if (!context.embed()) {
about.append('div')
.attr('class', 'account')
.call(iD.ui.Account(context));
}
var linkList = about.append('ul')
.attr('id', 'about')