Centre the writing column again
Pinning it to the left edge put the start of every line in the same place, which was the point, but on a wide window it left the entire right half of the pane as one dead block. Centred, the same leftover space reads as two margins instead. The page surface that tried to give that block a meaning is reverted in the commit before this one: it made the whole sheet sit hard against the left edge, which was worse than the problem. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
558c15f2c9
commit
dcc42bb8e0
2 files changed
+27
-4
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/* Throwaway: one wide screenshot of the writing surface, to look at it. */
|
||||
import { OUT, launch, withFreshUser, createNotebook, createNote, typeInEditor } from "./lib.mjs";
|
||||
|
||||
const browser = await launch();
|
||||
const session = await withFreshUser(browser, "shot");
|
||||
const p = session.page;
|
||||
await p.setViewportSize({ width: 1680, height: 900 });
|
||||
await createNotebook(p, "Look");
|
||||
await createNote(p);
|
||||
await typeInEditor(p, "askjdnasjkdnkjasndjknkjaskjdnasjkdskajndjkanHelkl HALLLO");
|
||||
await p.keyboard.press("Enter");
|
||||
await p.keyboard.type("sdfsdfsdfsdfasddddd");
|
||||
await p.waitForTimeout(1500);
|
||||
await p.screenshot({ path: `${OUT}/look.png` });
|
||||
const box = await p.evaluate(() => {
|
||||
const pm = document.querySelector(".ProseMirror").getBoundingClientRect();
|
||||
const pane = document.querySelector(".note-editor").parentElement.getBoundingClientRect();
|
||||
return { pm: { x: Math.round(pm.x), w: Math.round(pm.width) }, pane: { x: Math.round(pane.x), w: Math.round(pane.width) } };
|
||||
});
|
||||
console.log(JSON.stringify(box));
|
||||
await session.cleanup();
|
||||
await browser.close();
|
||||
Reference in new issue
Block a user