diff --git a/src/js/controller.js b/src/js/controller.js index cee0983..3271e25 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -73,11 +73,17 @@ angular.module('focaModalPuntoDescarga') }); }; - $scope.seleccionarPunto = function(idx) { + $scope.seleccionarPunto = function(idx, esCheckbox) { var indexPunto = $scope.puntosSeleccionados.indexOf(idx); if(indexPunto !== -1) { + if(!esCheckbox){ + $scope.puntosDescarga[idx].seleccionado = false; + } $scope.puntosSeleccionados.splice(indexPunto, 1); }else { + if(!esCheckbox){ + $scope.puntosDescarga[idx].seleccionado = true; + } $scope.puntosSeleccionados.push(idx); } }; diff --git a/src/js/osm-directive.js b/src/js/osm-directive.js index af9795b..c376535 100644 --- a/src/js/osm-directive.js +++ b/src/js/osm-directive.js @@ -12,7 +12,7 @@ angular.module('focaModalPuntoDescarga').directive('osmPuntoDescarga', function( //resuelve bug mapa gris en modales $timeout(function() { $scope.map.invalidateSize(); - }, 1000); + }, 100); $scope.markers = []; $scope.$watchGroup(['latitud', 'longitud'], function() { diff --git a/src/views/modal-punto-descarga.html b/src/views/modal-punto-descarga.html index 5666ce5..f786e42 100644 --- a/src/views/modal-punto-descarga.html +++ b/src/views/modal-punto-descarga.html @@ -32,22 +32,29 @@