fixes flipped stamp rotation math

This commit is contained in:
tim h 2023-02-26 09:36:05 -06:00
parent 81e3c34cd9
commit e1a694281e
2 changed files with 6 additions and 2 deletions

View file

@ -487,7 +487,7 @@
<script <script
src="js/ui/tool/select.js?v=b84bf02" src="js/ui/tool/select.js?v=b84bf02"
type="text/javascript"></script> type="text/javascript"></script>
<script src="js/ui/tool/stamp.js?v=5e07542" type="text/javascript"></script> <script src="js/ui/tool/stamp.js?v=4494df6" type="text/javascript"></script>
<script <script
src="js/ui/tool/interrogate.js?v=dd45b4a" src="js/ui/tool/interrogate.js?v=dd45b4a"
type="text/javascript"></script> type="text/javascript"></script>

View file

@ -372,7 +372,11 @@ const stampTool = () =>
state.dragcb = (evn) => { state.dragcb = (evn) => {
if (rotating) { if (rotating) {
if (state.flipStamp) {
rotation = Math.atan2(evn.x - rotating.x, evn.y - rotating.y);
} else {
rotation = Math.atan2(rotating.x - evn.x, evn.y - rotating.y); rotation = Math.atan2(rotating.x - evn.x, evn.y - rotating.y);
}
if (evn.evn.shiftKey) if (evn.evn.shiftKey)
rotation = rotation =