From 23e8e41259eeb368253005f3297ec412550a9d3c Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 29 Jul 2013 14:31:07 -0700 Subject: [PATCH] Fix sidebar transition (fixes #1653) --- 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 6fb5e9e8f..bc604dc8a 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -51,8 +51,10 @@ iD.ui.Inspector = function(context) { .entityID(entityID)); function showList(preset) { + var right = $wrap.style('right').indexOf('%') > 0 ? '-100%' : '-' + selection.style('width'); + $wrap.transition() - .style('right', '-100%'); + .style('right', right); $presetPane.call(presetList .preset(preset) @@ -60,8 +62,10 @@ iD.ui.Inspector = function(context) { } function setPreset(preset) { + var right = $wrap.style('right').indexOf('%') > 0 ? '0%' : '0px'; + $wrap.transition() - .style('right', '0%'); + .style('right', right); $editorPane.call(entityEditor .preset(preset));