This is a Leaflet Geoman Subplugin
Demo: PMOrtho
Download pmOrtho.js and include them in your project.
<script src="./dist/pmOrtho.js"></script>
or use the script over cdn:
<script src="https://cdn.jsdelivr.net/gh/Falke-Design/PMOrtho/dist/pmOrtho.js"></script>
Add PMOrtho after Leaflet Geoman
pmOrtho = new L.PMOrtho(map)
You can set a custom key to enable ortho mode. The custom key can be event.key, event.which, event.code (https://keycode.info/)
pmOrtho = new L.PMOrtho(map, {customKey: 'b'})
pmOrtho.setOptions(options)
allowOrtho: true | false
customKey: event.key | event.which | event.code
snapAngle: 45
baseAngleOfLastSegment: false