Fix short history move bug
This commit is contained in:
parent
8cf1125b78
commit
463f1d186e
@ -39,7 +39,7 @@
|
||||
<script type="text/javascript" src="js/services.js?3"></script>
|
||||
<script type="text/javascript" src="js/controllers.js?2"></script>
|
||||
<script type="text/javascript" src="js/filters.js?1"></script>
|
||||
<script type="text/javascript" src="js/directives.js?2"></script>
|
||||
<script type="text/javascript" src="js/directives.js?3"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -97,6 +97,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
|
||||
function link (scope, element, attrs) {
|
||||
var historyWrap = $('.im_history_wrap')[0],
|
||||
historyEl = $('.im_history')[0],
|
||||
scrollableWrap = $('.im_history_scrollable_wrap')[0],
|
||||
scrollable = $('.im_history_scrollable')[0],
|
||||
panelWrap = $('.im_history_panel_wrap', element)[0],
|
||||
@ -182,6 +183,9 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
$(historyWrap).css({
|
||||
height: $($window).height() - panelWrap.offsetHeight - sendFormWrap.offsetHeight - 90
|
||||
});
|
||||
$(historyEl).css({
|
||||
minHeight: $($window).height() - panelWrap.offsetHeight - sendFormWrap.offsetHeight - 90 - 44
|
||||
});
|
||||
|
||||
if (heightOnly) return;
|
||||
if (atBottom) {
|
||||
@ -329,10 +333,9 @@ angular.module('myApp.directives', ['myApp.filters'])
|
||||
};
|
||||
|
||||
function link (scope, element, attrs) {
|
||||
|
||||
scope.$watch('thumb.location', function (newVal) {
|
||||
if (!scope.thumb || !scope.thumb.location) {
|
||||
element.attr('src', scope.thumb.placeholder || '');
|
||||
element.attr('src', scope.thumb && scope.thumb.placeholder || '');
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user