Skip to content

Commit

Permalink
Fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnjsstong committed Dec 28, 2013
1 parent 17f47cf commit 1aaa539
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/directives/ng-panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,16 @@ angular.module('angular-panorama')
container.css('width', containerWidth + 'px');
return containerWidth;
}

if(angular.isDefined(iAttrs.ngPanoramaBackgroundImage)) {
container.css('background-image', 'url('+iAttrs.ngPanoramaBackgroundImage+')');
container.css('background-position','0% 50%');
// container.css('background-repeat', 'no-repeat');
// container.css('background-attachment', 'fixed');
// container.css('background-position', '0% 50%');
}
scope.$watch('iAttrs.ngPanoramaBackgroundImage', function(newValue){
if(newValue) {
container.css('background-image', 'url('+newValue+')');
container.css('background-position','0% 50%');
}
});

/* enable panorama indicator */
if (angular.isDefined(iAttrs.ngPanoramaIndicator)) {
Expand Down

0 comments on commit 1aaa539

Please sign in to comment.