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
5e0b0535
Commit
5e0b0535
authored
Dec 29, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dragresize: use lit-html to render the template
parent
12bb9375
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
src/plugins/dragresize/templates/dragresize.html
src/plugins/dragresize/templates/dragresize.html
+0
-3
src/plugins/dragresize/templates/dragresize.js
src/plugins/dragresize/templates/dragresize.js
+7
-0
src/plugins/dragresize/utils.js
src/plugins/dragresize/utils.js
+3
-2
No files found.
src/plugins/dragresize/templates/dragresize.html
deleted
100644 → 0
View file @
12bb9375
<div
class=
"dragresize dragresize-top"
></div>
<div
class=
"dragresize dragresize-topleft"
></div>
<div
class=
"dragresize dragresize-left"
></div>
src/plugins/dragresize/templates/dragresize.js
0 → 100644
View file @
5e0b0535
import
{
html
}
from
"
lit-html
"
;
export
default
()
=>
html
`
<div class="dragresize dragresize-top"></div>
<div class="dragresize dragresize-topleft"></div>
<div class="dragresize dragresize-left"></div>
`
;
src/plugins/dragresize/utils.js
View file @
5e0b0535
import
tpl_dragresize
from
'
./templates/dragresize.
html
'
;
import
tpl_dragresize
from
'
./templates/dragresize.
js
'
;
import
{
_converse
,
api
}
from
'
@converse/headless/core
'
;
import
{
render
}
from
'
lit-html
'
;
/**
* Applies some resistance to `value` around the `default_value`.
...
...
@@ -25,7 +26,7 @@ export function applyDragResistance (value, default_value) {
export
function
renderDragResizeHandles
(
_converse
,
view
)
{
const
flyout
=
view
.
el
.
querySelector
(
'
.box-flyout
'
);
const
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
tpl_dragresize
(
);
render
(
tpl_dragresize
(),
div
);
flyout
.
insertBefore
(
div
,
flyout
.
firstChild
);
}
...
...
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