Closed ViperX7 closed 3 weeks ago
This functionality is outside the scope of this plugin and I do not plan to add it. However you can easily add custom JS by storing it somewhere within your docs and adding this to mkdocs.yml
:
extra_javascript:
- custom.js
The code you provided throws an error:
Uncaught DOMException: Node.insertBefore: Child to insert before is not a child of this node
But this is because the actual hierarchy is .d2 -> .d2-light/.d2-dark -> svg
, not .d2 -> svg
.
I am using a plugin to display large graphs, and it makes sense to enable zooming and panning. I've written some JavaScript code that allows this to work, but I am struggling to integrate it directly into the plugin itself
I believe if you just add the js it should work without any further changes