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
969c94d4
Commit
969c94d4
authored
Sep 25, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Honor the min-width and min-height CSS properties...
when it comes to chat box resizing.
parent
9c167115
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
converse.js
converse.js
+7
-3
css/converse.css
css/converse.css
+3
-1
sass/_core.scss
sass/_core.scss
+2
-0
No files found.
converse.js
View file @
969c94d4
...
...
@@ -1336,8 +1336,8 @@
/* Determine and store the default box size.
* We need this information for the drag-resizing feature.
*/
var
$flyout
=
this
.
$el
.
find
(
'
.box-flyout
'
);
if
(
typeof
this
.
model
.
get
(
'
height
'
)
==
'
undefined
'
)
{
var
$flyout
=
this
.
$el
.
find
(
'
.box-flyout
'
);
var
height
=
$flyout
.
height
();
var
width
=
$flyout
.
width
();
this
.
model
.
set
(
'
height
'
,
height
);
...
...
@@ -1345,6 +1345,10 @@
this
.
model
.
set
(
'
width
'
,
width
);
this
.
model
.
set
(
'
default_width
'
,
width
);
}
var
min_width
=
$flyout
.
css
(
'
min-width
'
);
var
min_height
=
$flyout
.
css
(
'
min-height
'
);
this
.
model
.
set
(
'
min_width
'
,
min_width
.
endsWith
(
'
px
'
)
?
Number
(
min_width
.
replace
(
/px$/
,
''
))
:
0
);
this
.
model
.
set
(
'
min_height
'
,
min_height
.
endsWith
(
'
px
'
)
?
Number
(
min_height
.
replace
(
/px$/
,
''
))
:
0
);
// Initialize last known mouse position
this
.
prev_pageY
=
0
;
this
.
prev_pageX
=
0
;
...
...
@@ -1770,7 +1774,7 @@
if
(
converse
.
resizing
.
direction
.
indexOf
(
'
top
'
)
===
0
)
{
diff
=
ev
.
pageY
-
this
.
prev_pageY
;
if
(
diff
)
{
this
.
height
-=
diff
;
this
.
height
=
((
this
.
height
-
diff
)
>
this
.
model
.
get
(
'
min_height
'
))
?
(
this
.
height
-
diff
)
:
this
.
model
.
get
(
'
min_height
'
)
;
this
.
prev_pageY
=
ev
.
pageY
;
this
.
setChatBoxHeight
(
this
.
height
);
}
...
...
@@ -1778,7 +1782,7 @@
if
(
converse
.
resizing
.
direction
.
indexOf
(
'
left
'
)
!==
-
1
)
{
diff
=
this
.
prev_pageX
-
ev
.
pageX
;
if
(
diff
)
{
this
.
width
+=
diff
;
this
.
width
=
((
this
.
width
+
diff
)
>
this
.
model
.
get
(
'
min_width
'
))
?
(
this
.
width
+
diff
)
:
this
.
model
.
get
(
'
min_width
'
)
;
this
.
prev_pageX
=
ev
.
pageX
;
this
.
setChatBoxWidth
(
this
.
width
);
}
...
...
css/converse.css
View file @
969c94d4
...
...
@@ -1255,7 +1255,9 @@
bottom
:
6px
;
box-shadow
:
1px
3px
5px
3px
rgba
(
0
,
0
,
0
,
0.4
);
display
:
block
;
position
:
absolute
;
}
position
:
absolute
;
min-width
:
200px
;
min-height
:
200px
;
}
#conversejs
.box-flyout
{
height
:
400px
;
}
@media
screen
and
(
max-width
:
480px
)
{
...
...
sass/_core.scss
View file @
969c94d4
...
...
@@ -1510,6 +1510,8 @@
box-shadow
:
1px
3px
5px
3px
rgba
(
0
,
0
,
0
,
0
.4
);
display
:
block
;
position
:
absolute
;
min-width
:
$chat-width
;
min-height
:
$chat-height
/
2
;
}
.box-flyout
{
...
...
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