haruhiko 6 лет назад
Родитель
Сommit
369ae58b54

+ 9 - 5
src/client/js/components/StaffCredit/StaffCredit.jsx

@@ -8,6 +8,8 @@ import {
 
 import contributors from './Contributor';
 
+const scrollSpeed = 0.3;
+
 /**
  * Page staff credit component
  *
@@ -42,6 +44,10 @@ export default class StaffCredit extends React.Component {
           isShown: true,
           userCommand: [],
         });
+        const target = $('.credit-curtain');
+        const scrollTargetHeight = target.children().innerHeight();
+        const duration = scrollTargetHeight / scrollSpeed;
+        target.animate({ scrollTop: scrollTargetHeight }, duration, 'linear');
       }
       else {
         // add UserCommand
@@ -100,11 +106,9 @@ export default class StaffCredit extends React.Component {
       });
       return (
         <div className="text-center" onClick={this.deleteCredit}>
-          <div className="credit-body">
-            <h1 className="staff-credit-mb-10">GROWI Contributors</h1>
-            <div className="clearfix"></div>
-            {credit}
-          </div>
+          <h1 className="staff-credit-mb-10">GROWI Contributors</h1>
+          <div className="clearfix"></div>
+          {credit}
         </div>
       );
     }

+ 0 - 8
src/client/styles/scss/_staff_credit.scss

@@ -35,14 +35,6 @@
     }
   }
 
-  .credit-body {
-    position: relative;
-    top: 100%;
-    // credit duration
-    animation-duration: 20s;
-    animation-timing-function: linear;
-  }
-
   h1 {
     font-size: 3em;
   }