Skip to content

Refactor and improve - #56

Merged
dreampuf merged 10 commits into
dreampuf:masterfrom
redneck-f25:refactor-and-improve
Mar 11, 2026
Merged

dreampuf merged 10 commits into
dreampuf:masterfrom
redneck-f25:refactor-and-improve

Conversation

@redneck-f25

@redneck-f25 redneck-f25 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Here are some more changes.

Hope you like it. Let me know, if you want me to change anything.

There is an issue with the reset button, if the review area has resized. I haven't found a solution yet.

Preview:

Commits in this PR:

  • b3ee14f Print caught errors to devtools console
  • c0d32f5 Render graph immediately if editor is changed programmatically
    • e.g. when an URL is given in the parameter list
  • 6a2298f Refactor collapsible editor and draggable split
    • reduce code for changing the style attribute
    • refactor event handling around splitter
    • add dblclick handler to split to 50%, (as VS Code does)
    • improve resize experience while dragging the splitter and resizing the window
  • ec8150b Prevent flickering when dragging the splitter
    • if the coursor leaves the splitter while dragging towards the editor, the cursor changes to 'text' or 'default' until the splitter has reached the new position and is under the cursor
  • 2ec405d Add options for presentation mode
    • see README.md
  • ca6ea4f Use flexbox to let renderer compute svg position
    • document.getElementById('review').offsetTop === 42 from CSS
    • document.getElementById('options').offsetHeight === 48 from font-size, line-height, padding and whatever
  • 757e1a9 2970553 Maintain center point when resizing SVG view
    • when panning and zooming a large graph into view, it is annoying if it's reset to initial size when the editor or window is resized or rotated
  • 6585dfa 7e34a06 Add link to GitHub repo to option bar
    • adjust repo url to hostname
  • 77edde0 defd456 Render editor gutter with stable width
    • if a large file is loaded into the editor and line number 100 comes into view while scrolling down, the gutter widens and then narrows again when scrolling back up
  • 404ca0c 05e88a5 Handle touch events with svg-pan-zoom
    • for mobile devices and touch screens

@redneck-f25
redneck-f25 marked this pull request as draft March 11, 2026 10:02
@redneck-f25

Copy link
Copy Markdown
Contributor Author

Found a solution for the mentioned issue. I'll fix this.

@redneck-f25
redneck-f25 force-pushed the refactor-and-improve branch from 05e88a5 to 404ca0c Compare March 11, 2026 10:10
@redneck-f25
redneck-f25 marked this pull request as ready for review March 11, 2026 10:26
@dreampuf
dreampuf merged commit 6d24e9b into dreampuf:master Mar 11, 2026
@dreampuf

Copy link
Copy Markdown
Owner

Thanks! It's great!

@redneck-f25
redneck-f25 deleted the refactor-and-improve branch March 11, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants