sketchy version of reference animation.

This commit is contained in:
saman bb
2013-03-25 21:34:40 -04:00
parent 34e64f983c
commit ffaea10ca4
3 changed files with 23 additions and 5 deletions

View File

@@ -1249,7 +1249,6 @@ div.combobox {
border-right: 1px solid #CCC;
}
.tag-row:first-child input.key {
border-top: 1px solid #CCC;
border-top-left-radius: 4px;
@@ -1309,6 +1308,10 @@ div.combobox {
/* Tag reference */
.tag-help {
overflow: hidden;
}
img.wiki-image {
float: left;
max-width: 33.3333%;

View File

@@ -143,13 +143,29 @@ iD.ui.preset = function(context, entity, preset) {
selection.selectAll('.tag-help')
.style('display', function(field) {
return field.showingReference ? 'block' : 'none';
return field.showingReference ? 'block' : 'block';
})
.each(function(field) {
if (field.showingReference) {
d3.select(this)
.call(iD.ui.TagReference(entity, {key: field.key}));
}
.call(iD.ui.TagReference(entity, {key: field.key}))
.style('max-height', '0px')
.style('padding-top', '0px')
.style('opacity', '0')
.transition()
.duration(200)
.style('padding-top', '20px')
.style('max-height', '200px')
.style('opacity', '1');
} else {
d3.select(this)
.call(iD.ui.TagReference(entity, {key: field.key}))
.transition()
.duration(200)
.style('max-height', '0px')
.style('padding-top', '0px')
.style('opacity', '0');
}
});
selection.exit()

View File

@@ -59,7 +59,6 @@ iD.ui.TagReference = function(entity, tag) {
.attr('target', '_blank')
.attr('href', 'http://wiki.openstreetmap.org/wiki/' + docs.title)
.text(t('inspector.reference'));
});
}
};