mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Save composer height in localStorage
This commit is contained in:
parent
461885c40d
commit
3d6d3192d9
|
@ -38,7 +38,7 @@ export default Ember.View.extend(Ember.Evented, {
|
|||
var controller = this.get('controller');
|
||||
|
||||
// Hide the composer to begin with.
|
||||
this.set('height', this.$().height());
|
||||
this.set('height', localStorage.getItem('composerHeight') || this.$().height());
|
||||
this.$().hide();
|
||||
|
||||
// If the composer is minimized, allow the user to click anywhere on
|
||||
|
@ -223,9 +223,12 @@ export default Ember.View.extend(Ember.Evented, {
|
|||
// height so that it fills the height of the composer, and update the
|
||||
// body's padding.
|
||||
var deltaPixels = event.data.mouseStart - event.clientY;
|
||||
view.set('height', event.data.heightStart + deltaPixels);
|
||||
var height = event.data.heightStart + deltaPixels;
|
||||
view.set('height', height);
|
||||
view.updateContentHeight();
|
||||
view.updateBodyPadding();
|
||||
|
||||
localStorage.setItem('composerHeight', height);
|
||||
},
|
||||
|
||||
mouseWasReleased: function(event) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user