Commit 5e0b0535 authored by JC Brand's avatar JC Brand

dragresize: use lit-html to render the template

parent 12bb9375
<div class="dragresize dragresize-top"></div>
<div class="dragresize dragresize-topleft"></div>
<div class="dragresize dragresize-left"></div>
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>
`;
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment