fix inspector transition in firefox

firefox not returning the computed style as a percentage
was breaking the transition
This commit is contained in:
Ansis Brammanis
2013-03-28 20:52:44 -04:00
parent c31ce3ebd9
commit 8f390bd019

View File

@@ -49,9 +49,10 @@ iD.ui.Inspector = function(context, entity) {
var presetGrid = iD.ui.PresetGrid(context, entity)
.on('close', browse)
.on('choose', function(preset) {
var right = panewrap.style('right').indexOf('%') > 0 ? '0%' : '0px';
panewrap
.transition()
.style('right', '0%');
.style('right', right);
tagLayer.call(tagEditor, preset);
});
@@ -61,9 +62,12 @@ iD.ui.Inspector = function(context, entity) {
.on('changeTags', changeTags)
.on('close', browse)
.on('choose', function(preset) {
var right = panewrap.style('right').indexOf('%') > 0 ?
'-100%' :
'-' + selection.style('width');
panewrap
.transition()
.style('right', '-100%');
.style('right', right);
presetLayer.call(presetGrid, preset);
});