You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am implementing a "comment cell" function, when there is a comment text for a cell there will be a solid orange triangle at the top right corner of the cell. When clicking the cell, the comment text will be displayed.
I implemented it in drawCell function in core package. I think it's the right place for it. (I've ever tried implement in a GridCellKind.Custom way, however it's hard for NumberCell, TextCell etc. )
How ever it seems after it causes the text displayed in yellow in cells in the same column below the row.
Can anyone help me work it out?
const r = getCellRenderer(cell);
if (r !== undefined) {
if (lastPrep?.renderer !== r) {
lastPrep?.deprep?.(args);
lastPrep = undefined;
}
const partialPrepResult = r.drawPrep?.(args, lastPrep);
if (drawCellCallback !== undefined && !isInnerOnlyCell(args.cell)) {
drawCellCallback(args as DrawArgs<GridCell>, () => r.draw(args, cell));
} else {
r.draw(args, cell);
}
if (cell.memoMark === true){ // here is where I draw triangle in the cell.
setTimeout(()=>{
ctx.save();
ctx.fillStyle = 'orange';
ctx.beginPath();
ctx.moveTo(x + w - 8, y);
ctx.lineTo(x + w, y);
ctx.lineTo(x + w, y + 8);
ctx.lineTo(x + w - 8, y);
ctx.fill();
ctx.restore();
console.log(`memoMark`);
}, 0);
}
result =
The content you are editing has changed. Please copy your edits and refresh the page.
I am implementing a "comment cell" function, when there is a comment text for a cell there will be a solid orange triangle at the top right corner of the cell. When clicking the cell, the comment text will be displayed.
I implemented it in drawCell function in core package. I think it's the right place for it. (I've ever tried implement in a GridCellKind.Custom way, however it's hard for NumberCell, TextCell etc. )
How ever it seems after it causes the text displayed in yellow in cells in the same column below the row.
Can anyone help me work it out?
Tasks
The text was updated successfully, but these errors were encountered: