Fix tagreference, fixes #1160

This commit is contained in:
Tom MacWright
2013-03-27 16:05:33 -04:00
parent a47026f5d7
commit 2c1e598a1e
2 changed files with 25 additions and 8 deletions
+11
View File
@@ -1280,6 +1280,17 @@ div.combobox {
overflow: hidden;
}
.additional-tags div.tag-help {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
background:#fff;
}
.additional-tags .tag-help .tag-reference-wrap {
padding: 10px;
}
img.wiki-image {
float: left;
max-width: 33.3333%;
+14 -8
View File
@@ -92,19 +92,25 @@ iD.ui.Taglist = function(context, entity) {
.attr('tabindex', -1)
.attr('class', 'tag-help minor')
.on('click', function(tag) {
row.selectAll('div.tag-help')
.style('display', 'none');
d3.select(d3.select(this).node().parentNode)
.select('div.tag-help')
.style('display', 'block')
.call(iD.ui.TagReference(entity, {key: tag.key}));
var other = row.selectAll('div.tag-help'),
mine = d3.select(this.parentNode)
.select('div.tag-help');
if (mine.style('display') === 'none') {
other.style('display', 'none');
d3.select(this.parentNode)
.select('div.tag-help')
.style('display', 'block')
.call(iD.ui.TagReference(entity, {key: tag.key}));
} else {
mine.style('display', 'none');
}
})
.append('span')
.attr('class', 'icon inspect');
row.append('div')
.attr('class', 'tag-help');
.attr('class', 'tag-help col12')
.style('display', 'none');
return li;
}