globalMap.controller.js 718 B

12345678910111213141516171819202122232425262728
  1. (function(){
  2. 'use strict'
  3. app.controller('GlobalMap', [ '$scope', '$location', function($scope, $location){
  4. $scope.style = {
  5. dasharray: 0,
  6. // dashoffset: 0
  7. fill: 'none',
  8. stroke: 'black',
  9. }
  10. setInterval(function(){
  11. if($scope.style.dasharray < 2800){
  12. $scope.style.dasharray += 50;
  13. }else {
  14. $scope.style.fill = 'white';
  15. }
  16. // $scope.style.dashoffset -= 0;
  17. $scope.$apply();
  18. return $scope.style;
  19. }, 100)
  20. $scope.showEurop = function(){
  21. $location.path($location.url() + '/europe');
  22. }
  23. }])
  24. })()