smoother inspect animation.

This commit is contained in:
Saman Bemel-Benrud
2013-03-19 13:48:17 -04:00
parent d0349ebaf8
commit 6b31e389ae
2 changed files with 12 additions and 10 deletions

View File

@@ -734,10 +734,7 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
}
.preset-inspect {
position: relative;
background: white;
padding-top: 10px;
padding-bottom: 20px;
}
.grid-entry > .icon {
@@ -767,12 +764,12 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
}
.current .grid-entry,
.current .grid-entry .label {
.current .grid-entry .label {
background-color: #eef0ff;
}
.category .grid-entry:after,
.category .grid-entry:before {
.category .grid-entry:before {
content: "";
position: absolute;
top: 7px;
@@ -782,7 +779,7 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
height: 6px;
}
.category .grid-entry:before {
.category .grid-entry:before {
top: 3px;
}
@@ -882,7 +879,7 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
.tag-wrap .grid-button-wrap .grid-entry .label {
background: #eef0ff;
}
}
.inspector-body .name {
height: 110px;

View File

@@ -182,9 +182,13 @@ iD.ui.PresetGrid = function(context, entity) {
presetinspect
.style('max-height', '0px')
.style('padding-top', '0px')
.style('padding-bottom', '0px')
.transition()
.duration(200)
.style('max-height', '400px');
.duration(400)
.style('padding-top', '10px')
.style('padding-bottom', '20px')
.style('max-height', '200px');
presetinspect.append('h2')
.text(d.name());
@@ -217,7 +221,8 @@ iD.ui.PresetGrid = function(context, entity) {
presetinspect.selectAll('*')
.style('opacity','0')
.transition()
.duration(400)
.delay(200)
.duration(200)
.style('opacity','1');
}