Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ class Table {
this._createTableConfiguration();
} else {
// Create table preview if New table is initialised
this.wrapper.classList.add("table-selector");
this.wrapper.classList.add("tc-table-drawer-selector");
this.wrapper.setAttribute("data-hoveredClass", "m,n");
const rows = 6;
this.createCells(rows);
//Hover to select cells
if (this.wrapper.className === "table-selector") {
if (this.wrapper.className === "tc-table-drawer-selector") {
this.wrapper.addEventListener("mouseover", (event) => {
const selectedCell = event.target.id;
if (selectedCell.length) {
Expand Down Expand Up @@ -206,12 +206,12 @@ class Table {
if (rows !== 0) {
for (let i = 0; i < rows; i++) {
let rowDiv = document.createElement("div");
rowDiv.setAttribute("class", "table-row");
rowDiv.setAttribute("class", "tc-table-drawer-row");
for (let j = 0; j < rows; j++) {
let columnDivContainer = document.createElement("div");
let columnDiv = document.createElement("div");
columnDivContainer.setAttribute("class", "table-cell-container");
columnDiv.setAttribute("class", "table-cell");
columnDivContainer.setAttribute("class", "tc-table-drawer-cell-container");
columnDiv.setAttribute("class", "tc-table-drawer-cell");
columnDivContainer.setAttribute("id", `row_${i + 1}_cell_${j + 1}`);
columnDivContainer.setAttribute("column", j + 1);
columnDivContainer.setAttribute("row", i + 1);
Expand Down
8 changes: 4 additions & 4 deletions src/styles/table.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@
border-left: none;
}
}
.table-selector {
.tc-table-drawer-selector {
display: flex;
flex-direction: column;
.hidden-element {
display: none;
}
}
.table-row {
.tc-table-drawer-row {
display: flex;
flex-direction: row;
}
.table-cell-container {
.tc-table-drawer-cell-container {
width: 30px;
height: 30px;
}
.table-cell {
.tc-table-drawer-cell {
width: 25px;
height: 25px;
background: rgba(246, 246, 246);
Expand Down