Skip to content

Commit

Permalink
cleanup + add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Jan 23, 2025
1 parent b8d0a54 commit dc9024d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export class PastaMirror {
// sry reckter i removed the comment marker thing
// i think this is not only good for chat, but also
// for letting code die in a cool way...
// hmmmmm but i'm actually not very sure anymore after trying it a bit
const transaction = view.state.update({
changes: { from: line.from, to: line.to, insert },
selection: { anchor: line.from + insert.length },
Expand Down Expand Up @@ -304,11 +305,9 @@ export class PastaMirror {
chat(message) {
const view = this.editorViews.get(message.docId);
const line = view.state.doc.lineAt(message.from);
console.log('line.from', line.from);
const pos = view.coordsAtPos(line.from);
const chatContainer = document.querySelector('.chat-container');
if (pos) {
console.log('chat', message.message, pos);
const messageContainer = document.createElement('div');
messageContainer.innerText = message.message;
const offsetX = 30; // not sure why
Expand Down

0 comments on commit dc9024d

Please sign in to comment.