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 1aaa539 commit 80ebff1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions angular-panorama.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Angular Panorama - Mimic Windows Phone's Panorama UI control.
* @version v0.1.0 - 2013-12-28
* @version v0.1.1 - 2013-12-28
* @link http://cnjsstong2.github.com/angular-panorama
* @author Tong Shen <[email protected]>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -319,14 +319,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
Loading

0 comments on commit 80ebff1

Please sign in to comment.