Commit 3a18789f authored by Kannan V M's avatar Kannan V M
Browse files

Fix ui issues

parent 51b46902
......@@ -107,7 +107,7 @@ userNamespace.on('connection', (socket) => {
socket.on('leaf text', (leafText) => {
const leafData = {};
leafData.leafText = leafText;
if (!(leavesData[roomId][socketId].leafText)) {
if (!(leavesData[roomId][socketId].leafId)) {
leafData.leafId = roomLeafIds[roomId].leafIds.shift();
}
......
......@@ -38,6 +38,9 @@ function registerUser() {
});
socket.on('enter knowledge', () => {
document.getElementById("close-button").style.display = "none";
document.getElementById("knowledge").style.display = "none";
document.getElementById("tree").style.visibility = "visible";
const inputField = document.getElementById('input-fields');
const inputForm =
`<form id="knowledge-form">
......@@ -60,13 +63,18 @@ function registerUser() {
function popupLeaf() {
let knowledgeId = this.id.replace('path', 'knowledge');
console.log(knowledgeId);
document.getElementById(knowledgeId).style.display = 'block';
document.getElementById('knowledge').style.display = 'block';
document.getElementById('knowledge').style.backgroundImage = 'url("leaf.svg")';
document.getElementById('knowledge').style.backgroundRepeat = 'no-repeat';
document.getElementById('knowledge').style.backgroundSize = 'cover';
document.getElementById('tree').style.visibility = 'hidden';
document.getElementById('knowledge-form').style.visibility = 'hidden';
if (document.getElementById('tree')){
document.getElementById('tree').style.visibility = 'hidden';
}
if (document.getElementById('knowledge-form')){
document.getElementById('knowledge-form').style.visibility = 'hidden';
}
document.getElementById('close-button').style.display = 'block';
}
......
Supports Markdown
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