Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
2546622d
Commit
2546622d
authored
Jul 25, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trigger events when resizing starts
parent
45e19acf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
6 deletions
+31
-6
src/converse-dragresize.js
src/converse-dragresize.js
+27
-4
src/converse-minimize.js
src/converse-minimize.js
+1
-1
src/headless/converse-core.js
src/headless/converse-core.js
+3
-1
No files found.
src/converse-dragresize.js
View file @
2546622d
...
...
@@ -251,7 +251,7 @@ converse.plugins.add('converse-dragresize', {
}
},
onStartVerticalResize
(
ev
)
{
onStartVerticalResize
(
ev
,
trigger
=
true
)
{
if
(
!
_converse
.
allow_dragresize
)
{
return
true
;
}
// Record element attributes for mouseMove().
const
flyout
=
this
.
el
.
querySelector
(
'
.box-flyout
'
),
...
...
@@ -262,9 +262,17 @@ converse.plugins.add('converse-dragresize', {
'
direction
'
:
'
top
'
};
this
.
prev_pageY
=
ev
.
pageY
;
if
(
trigger
)
{
/**
* Triggered once the user starts to vertically resize a {@link _converse.ChatBoxView}
* @event _converse#startVerticalResize
* @example _converse.api.listen.on('startVerticalResize', (view) => { ... });
*/
_converse
.
api
.
trigger
(
'
startVerticalResize
'
,
this
);
}
},
onStartHorizontalResize
(
ev
)
{
onStartHorizontalResize
(
ev
,
trigger
=
true
)
{
if
(
!
_converse
.
allow_dragresize
)
{
return
true
;
}
const
flyout
=
this
.
el
.
querySelector
(
'
.box-flyout
'
),
style
=
window
.
getComputedStyle
(
flyout
);
...
...
@@ -274,12 +282,27 @@ converse.plugins.add('converse-dragresize', {
'
direction
'
:
'
left
'
};
this
.
prev_pageX
=
ev
.
pageX
;
if
(
trigger
)
{
/**
* Triggered once the user starts to horizontally resize a {@link _converse.ChatBoxView}
* @event _converse#startHorizontalResize
* @example _converse.api.listen.on('startHorizontalResize', (view) => { ... });
*/
_converse
.
api
.
trigger
(
'
startHorizontalResize
'
,
this
);
}
},
onStartDiagonalResize
(
ev
)
{
this
.
onStartHorizontalResize
(
ev
);
this
.
onStartVerticalResize
(
ev
);
this
.
onStartHorizontalResize
(
ev
,
false
);
this
.
onStartVerticalResize
(
ev
,
false
);
_converse
.
resizing
.
direction
=
'
topleft
'
;
/**
* Triggered once the user starts to diagonally resize a {@link _converse.ChatBoxView}
* @event _converse#startDiagonalResize
* @example _converse.api.listen.on('startDiagonalResize', (view) => { ... });
*/
_converse
.
api
.
trigger
(
'
startDiagonalResize
'
,
this
);
},
};
Object
.
assign
(
_converse
.
ChatBoxView
.
prototype
,
dragResizable
);
...
...
src/converse-minimize.js
View file @
2546622d
...
...
@@ -315,7 +315,7 @@ converse.plugins.add('converse-minimize', {
* to create space.
* @private
* @method _converse.ChatBoxViews#trimChats
* @param {
[ChatBoxView|ChatRoomView|ControlBoxView|HeadlinesBoxView] } newchat
* @param {
_converse.ChatBoxView|_converse.ChatRoomView|_converse.ControlBoxView|_converse.HeadlinesBoxView } [newchat]
*/
async
trimChats
(
newchat
)
{
if
(
_converse
.
no_trimming
||
!
_converse
.
connection
.
connected
||
_converse
.
view_mode
!==
'
overlayed
'
)
{
...
...
src/headless/converse-core.js
View file @
2546622d
...
...
@@ -94,9 +94,11 @@ const CORE_PLUGINS = [
/**
* A private, closured object containing the private api (via {@link _converse.api})
* as well as private methods and internal data-structures.
*
*
@global
* @namespace _converse
*/
// XXX: Strictly speaking _converse is not a global, but we need to set it as
// such to get JSDoc to create the correct document site strucure.
const
_converse
=
{
'
templates
'
:
{},
'
promises
'
:
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment