ijprest / keyboard-layout-editor

Web application to enable the design & editing of keyboard layouts
http://www.keyboard-layout-editor.com/
Other
1.3k stars 241 forks source link

Rotation crosshairs not drawn in quite the right location #217

Open maxkorp opened 6 years ago

maxkorp commented 6 years ago

Edit: It appears the correct offset is 0.5 in either direction, but the crosshairs don't actually line up with that correctly

screen shot 2018-01-16 at 7 24 19 am screen shot 2018-01-16 at 7 24 25 am screen shot 2018-01-16 at 7 24 38 am

You can see that the switch rotates properly with a 0.5 offset, but the crosshairs seem to be offset up and to the left. It doesnt quite align with the bottom right of the crosshairs bounding-box either.

I was just thrown off by the crosshairs, but leaving the original writeup in case anybody is having the same issue:

~I'm trying to build a keyboard with a thumbcluster with some angled keys. I'm able to get it looking just fine in KLE as well as KiCAD, but I'm trying to line them up so I can use the swillkb plate tool and have it not clash with the pcb. In KiCAD, footprints (in this case a switch) are rotated compared to a set origin on the footprint (in this case, the dead center of the alignment hole in the middle of the switch, so right smack in the middle). In KLE, I'm having a hard time lining up with the center of the switch.~

~So for example, I have a switch of size 1x1, with an x-offset and y-offset of 2~

~I've tried an offset of .5 on the rotation (so at 2.5,2.5), which is not quite enough, and I've tried an extra 1/8th (2.625,2.625), and thats a hair too far. Even more confusingly, it appears to be offset differently in the x and y directions, where the center appears to be roughly 0.6 in the x direction and 0.55 in the y direction (2.6,2.55), which is just really weird.~

~Is there a way I'm missing to maybe just rotate on the center of the keys? Or to find exactly what offset I need?~