|
@@ -3,9 +3,10 @@
|
|
* @copyright 2020, the Converse.js contributors
|
|
* @copyright 2020, the Converse.js contributors
|
|
* @license Mozilla Public License (MPLv2)
|
|
* @license Mozilla Public License (MPLv2)
|
|
*/
|
|
*/
|
|
|
|
+import './components/dragresize.js';
|
|
import 'plugins/chatview/index.js';
|
|
import 'plugins/chatview/index.js';
|
|
import 'plugins/controlbox/index.js';
|
|
import 'plugins/controlbox/index.js';
|
|
-import { applyDragResistance, onMouseUp, onMouseMove, renderDragResizeHandles } from './utils.js';
|
|
|
|
|
|
+import { applyDragResistance, onMouseUp, onMouseMove } from './utils.js';
|
|
import DragResizableMixin from './mixin.js';
|
|
import DragResizableMixin from './mixin.js';
|
|
import { _converse, api, converse } from '@converse/headless/core';
|
|
import { _converse, api, converse } from '@converse/headless/core';
|
|
|
|
|
|
@@ -33,8 +34,8 @@ converse.plugins.add('converse-dragresize', {
|
|
ChatBox: {
|
|
ChatBox: {
|
|
initialize () {
|
|
initialize () {
|
|
const result = this.__super__.initialize.apply(this, arguments);
|
|
const result = this.__super__.initialize.apply(this, arguments);
|
|
- const height = this.get('height'),
|
|
|
|
- width = this.get('width');
|
|
|
|
|
|
+ const height = this.get('height');
|
|
|
|
+ const width = this.get('width');
|
|
const save = this.get('id') === 'controlbox' ? a => this.set(a) : a => this.save(a);
|
|
const save = this.get('id') === 'controlbox' ? a => this.set(a) : a => this.save(a);
|
|
save({
|
|
save({
|
|
'height': applyDragResistance(height, this.get('default_height')),
|
|
'height': applyDragResistance(height, this.get('default_height')),
|
|
@@ -44,50 +45,7 @@ converse.plugins.add('converse-dragresize', {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- ChatBoxView: {
|
|
|
|
- events: {
|
|
|
|
- 'mousedown .dragresize-top': 'onStartVerticalResize',
|
|
|
|
- 'mousedown .dragresize-left': 'onStartHorizontalResize',
|
|
|
|
- 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- render () {
|
|
|
|
- const result = this.__super__.render.apply(this, arguments);
|
|
|
|
- renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
- this.setWidth();
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- HeadlinesBoxView: {
|
|
|
|
- events: {
|
|
|
|
- 'mousedown .dragresize-top': 'onStartVerticalResize',
|
|
|
|
- 'mousedown .dragresize-left': 'onStartHorizontalResize',
|
|
|
|
- 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- render () {
|
|
|
|
- const result = this.__super__.render.apply(this, arguments);
|
|
|
|
- renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
- this.setWidth();
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
ControlBoxView: {
|
|
ControlBoxView: {
|
|
- events: {
|
|
|
|
- 'mousedown .dragresize-top': 'onStartVerticalResize',
|
|
|
|
- 'mousedown .dragresize-left': 'onStartHorizontalResize',
|
|
|
|
- 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- render () {
|
|
|
|
- const result = this.__super__.render.apply(this, arguments);
|
|
|
|
- renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
- this.setWidth();
|
|
|
|
- return result;
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
renderLoginPanel () {
|
|
renderLoginPanel () {
|
|
const result = this.__super__.renderLoginPanel.apply(this, arguments);
|
|
const result = this.__super__.renderLoginPanel.apply(this, arguments);
|
|
this.initDragResize().setDimensions();
|
|
this.initDragResize().setDimensions();
|
|
@@ -99,21 +57,6 @@ converse.plugins.add('converse-dragresize', {
|
|
this.initDragResize().setDimensions();
|
|
this.initDragResize().setDimensions();
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
- },
|
|
|
|
-
|
|
|
|
- ChatRoomView: {
|
|
|
|
- events: {
|
|
|
|
- 'mousedown .dragresize-top': 'onStartVerticalResize',
|
|
|
|
- 'mousedown .dragresize-left': 'onStartHorizontalResize',
|
|
|
|
- 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- render () {
|
|
|
|
- const result = this.__super__.render.apply(this, arguments);
|
|
|
|
- renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
- this.setWidth();
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|