Remove resize logic in favor of pure css
This commit is contained in:
parent
07e44ccf21
commit
3292177a96
7 changed files with 32 additions and 16 deletions
|
@ -40,10 +40,7 @@
|
|||
this.$el.find('.discussion-container').append(this.view.el);
|
||||
this.view.render();
|
||||
|
||||
window.addEventListener('resize', this.view.resize.bind(this.view));
|
||||
|
||||
setTimeout(function() {
|
||||
this.view.resize();
|
||||
this.view.scrollToBottom();
|
||||
}.bind(this), 10);
|
||||
},
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
collection : bg.inbox
|
||||
}).render();
|
||||
|
||||
window.addEventListener('resize', this.inbox.resize.bind(this.inbox));
|
||||
window.addEventListener('beforeunload', function () {
|
||||
this.inbox.stopListening();
|
||||
}.bind(this));
|
||||
|
|
|
@ -41,12 +41,6 @@ var Whisper = Whisper || {};
|
|||
addAll: function() {
|
||||
this.$el.html('');
|
||||
this.collection.each(this.addOne, this);
|
||||
this.resize();
|
||||
},
|
||||
|
||||
resize: function() {
|
||||
var height = window.innerHeight - $('#header').height() - $('#footer').height();
|
||||
this.$el.css('height', height + 'px');
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue