$scope .showIndex = $scope .imgSlide.length-1 ;
function runloop () {
$scope .showIndex = ($scope .showIndex+1 )%$scope .imgSlide.length;
}
var inter = $interval (runloop,2000 );
$scope .end = function (index) {
$scope .showIndex = index;
$interval .cancel(inter);
}
$scope .start = function () {
inter = $interval (runloop,2000 );
}
var showIndex = $('.point-box .point' ).length;
function runLoopPoint () {
var pointList = $('.point-box .point' );
showIndex = (showIndex+1 ) % pointList.length;
var legendData = pieDataAttr[showIndex % pieDataAttr.length].map(function (item) {
return item.name;
})
var mapBox = $('.map-box' );
var pointBox = $('.point-box .point' );
pointBox.eq(showIndex).addClass('active-point' ).siblings('.point' ).removeClass('active-point' );
}
$('.point-box' ).on('click' ,'.point' ,function () {
showIndex = $(this ).index();
clearInterval(inter);
$(this ).addClass('active-point' ).siblings('.point' ).removeClass('active-point' );
setTimeout(function () {
inter = setInterval(runLoopPoint,5000 );
},300000 );
});