Skip to content

Commit

Permalink
New release.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnjsstong committed Dec 30, 2013
1 parent 80ebff1 commit b0d2cc8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
10 changes: 7 additions & 3 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.1 - 2013-12-28
* @version v0.1.1 - 2013-12-30
* @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 @@ -323,10 +323,14 @@ angular.module('angular-panorama')
container.css('background-image', 'url('+iAttrs.ngPanoramaBackgroundImage+')');
container.css('background-position','0% 50%');
}
scope.$watch('iAttrs.ngPanoramaBackgroundImage', function(newValue){
iAttrs.$observe('ngPanoramaBackgroundImage', function(newValue, oldValue){
console.log(scope);
console.log(oldValue);
console.log(newValue);
if(newValue) {
console.log('changing..');
container.css('background-image', 'url('+newValue+')');
container.css('background-position','0% 50%');
container.css('background-position',scope.panoramaCollection.position/scope.panoramaCollection.lastIndex*100+'% 50%');
}
});

Expand Down
Loading

0 comments on commit b0d2cc8

Please sign in to comment.