Browse Source

ux(dashboard): minor tweak to row menu animation, it hides in a better way now after click #6442

Torkel Ödegaard 9 years ago
parent
commit
0da60a8bb2
2 changed files with 5 additions and 9 deletions
  1. 4 3
      public/app/core/components/grafana_app.ts
  2. 1 6
      public/sass/components/_row.scss

+ 4 - 3
public/app/core/components/grafana_app.ts

@@ -120,10 +120,11 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
         // hide it right away
         var clickAutoHide = target.closest('[data-click-hide]');
         if (clickAutoHide.length) {
-          clickAutoHide.toggleClass('transition-hide');
+          var clickAutoHideParent = clickAutoHide.parent();
+          clickAutoHide.detach();
           setTimeout(function() {
-            clickAutoHide.toggleClass('transition-hide');
-          }, 1000);
+            clickAutoHideParent.append(clickAutoHide);
+          }, 100);
         }
 
         if (target.parents('.dash-playlist-actions').length === 0) {

+ 1 - 6
public/sass/components/_row.scss

@@ -110,7 +110,7 @@ $dash-row-menu-animation-speed: 0.20s;
   position: absolute;
   top: 0px;
   transform: translate(-131px, 0);
-  transition: $dash-row-menu-animation-speed ease-out 0.5s;
+  transition: 0.1s ease-out 0.4s;
   z-index: 100;
   display: flex;
   flex-direction: row;
@@ -124,11 +124,6 @@ $dash-row-menu-animation-speed: 0.20s;
       opacity: 0;
       transition: $dash-row-menu-animation-speed ease-in 0.05s;
     }
-
-    &.transition-hide {
-      transform: translate(-131px, 0);
-      transition: 0.0s ease-in 0s;
-    }
   }
 }