a few fixes
parent
a01ad4fe0f
commit
8fb55749eb
|
@ -212,7 +212,7 @@ document.body.append(html.node`
|
|||
<span onblur=${addInstance} onkeydown=${function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
addInstance.call(this);
|
||||
this.blur();
|
||||
}
|
||||
}} class='title' contenteditable='true'>
|
||||
</span>
|
||||
|
|
|
@ -8,7 +8,8 @@ let mediaStream;
|
|||
|
||||
function loadCall() {
|
||||
let div = document.getElementById('call');
|
||||
render(div, html`
|
||||
div.innerHTML = '';
|
||||
render(div, html.node`
|
||||
<div id='users'></div>
|
||||
<p id='noone'>no one is in call</p>
|
||||
<button id='join' onclick=${async function(event) {
|
||||
|
@ -91,7 +92,7 @@ function loadCall() {
|
|||
this.innerText = 'join';
|
||||
}
|
||||
};
|
||||
}}>join</button>
|
||||
}}>${instance && thread === currentThread.id ? 'leave' : 'join'}</button>
|
||||
<hr color='#505050'>
|
||||
<div id='stream'></div>`);
|
||||
if (Object.keys(currentThread.call).length)
|
||||
|
|
|
@ -5,6 +5,7 @@ let scale = 1; // todo: make zooming work
|
|||
let editing;
|
||||
let dragging;
|
||||
let moved;
|
||||
let movedFrom;
|
||||
let offset;
|
||||
|
||||
document.onmousemove = event => {
|
||||
|
@ -113,6 +114,7 @@ export default function loadSpace(callback) {
|
|||
space = document.getElementById('space');
|
||||
space.onmousedown = event => {
|
||||
moved = false;
|
||||
movedFrom = { x: event.offsetX, y: event.offsetY };
|
||||
};
|
||||
space.onmouseup = event => {
|
||||
if (dragging) {
|
||||
|
@ -124,7 +126,8 @@ export default function loadSpace(callback) {
|
|||
editing = null;
|
||||
return;
|
||||
}
|
||||
if (moved)
|
||||
if (moved && (event.offsetX - movedFrom.x) * (event.offsetX - movedFrom.x)
|
||||
+ (event.offsetY - movedFrom.y) * (event.offsetY - movedFrom.y) > 100)
|
||||
return;
|
||||
editing = add({
|
||||
x: event.offsetX + space.scrollLeft,
|
||||
|
|
Loading…
Reference in New Issue