Commits

petraszd committed 02939e8

Play button

  • Participants
  • Parent commits f9a632d

Comments (0)

Files changed (3)

       <h1 id="header">Bankrotai Lietuvoje (Nuo 1993-04 iki 2012-01)</h1>
       <div id="map"></div>
       <div id="canvas"></div>
+      <a id="play" style="display: none;">Iš naujo</a>
     </div>
   </div>
   <div id="bottom">
     <table>
       <tr>
-        <th>Išeities&nbsp;kodas: </th>
-        <td>
-          <a href="https://github.com/petraszd/Transparency-Works-2012">https://github.com/petraszd/Transparency-Works-2012</a>
-        </td>
         <td class="social" rowspan="4">
-          <div>
-            <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
-            <script>!function(d,s,id){var
-              js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+          <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
+          <script>!function(d,s,id){var
+            js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
 
-            <br/>
+          <br/>
 
-            <fb:like send="false" layout="button_count" width="100" show_faces="false"></fb:like>
+          <fb:like send="false" layout="button_count" width="100" show_faces="false"></fb:like>
 
-            <br/>
-            <!-- Place this tag where you want the +1 button to render. -->
-            <div class="g-plusone" data-size="medium"></div>
+          <br/>
+          <!-- Place this tag where you want the +1 button to render. -->
+          <div class="g-plusone" data-size="medium"></div>
 
-            <!-- Place this tag after the last +1 button tag. -->
-            <script type="text/javascript">
-              (function() {
-                var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
-                po.src = 'https://apis.google.com/js/plusone.js';
-                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
-              })();
-            </script>
-          </div>
+          <!-- Place this tag after the last +1 button tag. -->
+          <script type="text/javascript">
+            (function() {
+              var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+              po.src = 'https://apis.google.com/js/plusone.js';
+              var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+            })();
+          </script>
+        </td>
+        <th>Išeities&nbsp;kodas: </th>
+        <td>
+          <a href="https://github.com/petraszd/Transparency-Works-2012">https://github.com/petraszd/Transparency-Works-2012</a>
         </td>
       </tr>
       <tr>
   textColor: '#3B2D38',
   sliderColor: '#3B2D38',
   growAnim: 150,
-  opacityAnim: (1000 / 5) * 8,
-  stepLength: 1000 / 5,
+  opacityAnim: (1000 / 3) * 8,
+  stepLength: 1000 / 3,
   initR: 2,
   multR: 1.5,
   w: 600,
 var circles = [];
 var date;
 var line;
+var play;
 
 function createMap () {
   var mapOptions = {
 
   if (!points || !points[1]) {
     clearInterval(timer);
+    play.style.display = 'block';
     return;
   }
 
   step = 0;
   setTimeout(function () {
     timer = setInterval(next, CFG.stepLength);
-  }, 10);
+  }, 500);
 
-  document.getElementById('header').addEventListener('click', function () {
+  play = document.getElementById('play');
+  play.addEventListener('click', function (e) {
+    e.preventDefault();
     restart();
   }, false);
 }
 }
 
 function onSliderStart() {
-  sliderX = slider.attr('x');
   clearInterval(timer);
+  play.style.display = 'block';
+
+  sliderX = slider.attr('x');
 }
 
 function onLineClick (e) {
   clearInterval(timer);
+  play.style.display = 'block';
 
   sliderX = e.layerX - 15;
   onSliderMove(0);
 }
 
 function restart () {
+  play.style.display = 'none';
+
   step = 0;
   for (var i = 0, c; c = circles[i]; ++i) {
     c.remove();
 h1 {
   margin: 0;
   padding: 0;
-  height: 50px;
-  line-height: 50px;
+  height: 40px;
+  line-height: 40px;
   font-size: 24px;
   text-align: center;
   font-weight: normal;
   vertical-align: top;
 }
 
-#bottom td.social div {
+#bottom td.social {
+  width: 190px;
+}
+
+#play {
+  display: block;
+  text-decoration: none;
+  cursor: pointer;
+  font-size: 11px;
+  color: #fff;
+  margin-top: 25px;
   float: right;
+  padding: 1px 7px;
+  border-radius: 8px;
+  background-color: #3B2D38;
+  z-index: 200;
+}
+
+#play:active {
+  padding: 2px 7px 0px 7px;;
 }