mirror of https://github.com/keeweb/keeweb.git
fix tags scrolling
This commit is contained in:
parent
df0716647d
commit
4d3fdb1c1b
|
@ -48,11 +48,13 @@ var MenuSectionView = Backbone.View.extend({
|
|||
this.itemViews.push(itemView);
|
||||
}, this);
|
||||
if (this.model.get('drag')) {
|
||||
if (typeof AppSettingsModel.instance.get('tagsViewHeight') === 'number') {
|
||||
this.$el.height(AppSettingsModel.instance.get('tagsViewHeight'));
|
||||
var height = AppSettingsModel.instance.get('tagsViewHeight');
|
||||
if (typeof height === 'number') {
|
||||
this.$el.height();
|
||||
this.$el.css('flex', '0 0 ' + height + 'px');
|
||||
}
|
||||
this.pageResized();
|
||||
}
|
||||
this.pageResized();
|
||||
},
|
||||
|
||||
remove : function() {
|
||||
|
@ -72,7 +74,12 @@ var MenuSectionView = Backbone.View.extend({
|
|||
this.render();
|
||||
},
|
||||
|
||||
viewResized: _.throttle(function(size) {
|
||||
viewResized: function(size) {
|
||||
this.$el.css('flex', '0 0 ' + (size ? size + 'px' : 'auto'));
|
||||
this.saveViewHeight(size);
|
||||
},
|
||||
|
||||
saveViewHeight: _.throttle(function(size) {
|
||||
AppSettingsModel.instance.set('tagsViewHeight', size);
|
||||
}, 1000)
|
||||
});
|
||||
|
|
|
@ -22,7 +22,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
&--scrollable {
|
||||
&--drag {
|
||||
@include flex(0 0 auto);
|
||||
max-height: calc(100vh - 180px);
|
||||
>.scroller {
|
||||
max-height: calc(100vh - 180px);
|
||||
}
|
||||
}
|
||||
|
||||
&--drag.menu__section {
|
||||
|
|
Loading…
Reference in New Issue