mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 01:24:05 +02:00
Hide account/logout when embedded (fixes #1229)
This commit is contained in:
@@ -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
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user