compact / angular-bootstrap-lightbox

An AngularJS lightbox built using UI Bootstrap Modal.
http://compact.github.io/angular-bootstrap-lightbox/
MIT License
306 stars 134 forks source link

Lightbox.keyboardNavEnabled overwritten by hardcoded values. #60

Open jerimiahbaldwin opened 8 years ago

jerimiahbaldwin commented 8 years ago

Seems that the Lightbox.keyboardNavEnabled is not working. It would appear that the parameter is being forced to "true" when openModal is called. Me thinks this is probably not the desired behavior as it completely overrides the user setting from controller.

` Lightbox.openModal = function (newImages, newIndex, modalParams) { Lightbox.images = newImages; Lightbox.setImage(newIndex);

  // store the modal instance so we can close it manually if we need to
  Lightbox.modalInstance = $uibModal.open(angular.extend({
    'templateUrl': Lightbox.templateUrl,
    'controller': ['$scope', function ($scope) {
      // $scope is the modal scope, a child of $rootScope
      $scope.Lightbox = Lightbox;

      Lightbox.keyboardNavEnabled = true;
    }],
    'windowClass': 'lightbox-modal'
  }, modalParams || {}));

`