From 8f390bd0196fa23efb7dbdfc5f9cff01c36f42a5 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 28 Mar 2013 20:52:44 -0400 Subject: [PATCH] fix inspector transition in firefox firefox not returning the computed style as a percentage was breaking the transition --- js/id/ui/inspector.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 774111e37..777b4d486 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -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); });