Two small changes.
- Width needs to be set on .chatroom obj as well. - Update docs on allow_dragresize to mention that min-width and min-height values are honored.
This commit is contained in:
parent
07985ccf54
commit
4f86a7ed58
15
converse.js
15
converse.js
|
@ -1251,11 +1251,7 @@
|
|||
)
|
||||
)
|
||||
);
|
||||
if (this.model.get('width')) {
|
||||
// If a custom width is applied (due to drag-resizing),
|
||||
// then we need to set the width of the .chatbox element as well.
|
||||
this.$el.css('width', this.model.get('width'));
|
||||
}
|
||||
this.setWidth();
|
||||
this.$content = this.$el.find('.chat-content');
|
||||
this.renderToolbar().renderAvatar();
|
||||
this.$content.on('scroll', _.debounce(this.onScroll.bind(this), 100));
|
||||
|
@ -1264,6 +1260,14 @@
|
|||
return this.showStatusMessage();
|
||||
},
|
||||
|
||||
setWidth: function () {
|
||||
// If a custom width is applied (due to drag-resizing),
|
||||
// then we need to set the width of the .chatbox element as well.
|
||||
if (this.model.get('width')) {
|
||||
this.$el.css('width', this.model.get('width'));
|
||||
}
|
||||
},
|
||||
|
||||
onScroll: function (ev) {
|
||||
if ($(ev.target).scrollTop() === 0 && this.model.messages.length) {
|
||||
this.fetchArchivedMessages({
|
||||
|
@ -2858,6 +2862,7 @@
|
|||
.html(converse.templates.chatroom(this.model.toJSON()));
|
||||
this.renderChatArea();
|
||||
this.$content.on('scroll', _.debounce(this.onScroll.bind(this), 100));
|
||||
this.setWidth();
|
||||
setTimeout(converse.refreshWebkit, 50);
|
||||
return this;
|
||||
},
|
||||
|
|
|
@ -127,9 +127,9 @@ allow_dragresize
|
|||
|
||||
* Default: ``true``
|
||||
|
||||
Allow users to resize chats by dragging the edges. Currently only supports
|
||||
vertical resizing, horizontal resizing coming soon.
|
||||
|
||||
Allow users to resize chats by dragging the edges. The min-height and min-width
|
||||
CSS properties set on a chat boxes (specifically on the ``#converse.js .chatbox > .box-flyout`` element)
|
||||
will be honored, IF they are set in pixels.
|
||||
|
||||
allow_muc
|
||||
---------
|
||||
|
|
Loading…
Reference in New Issue
Block a user