keyboard-layout-editor
keyboard-layout-editor copied to clipboard
[Bug] After saving, the sizes disappear
I have the gist.
This key on gist has legend center size 3:
I select all(Ctrl+A) and set the center size of Center legend to 4.
Then I saved this to JSON, loaded it, and the key despite everything has center size of Center Legend is 3!
This is the bug: site can't save the changed size when I change it by select all keys.
Something like this I have with colors of legend changed by selection of all.
Sorry for bad English.
I am also having the same issue with some colors and sizes not saving.
Before saving:
After saving:
From the screenshots you can see that the Top Left Legend is not saving correctly on some of the keys while others are saving correctly. Sometimes the colors are not saved as well.
I am having the same problem. The only workaround I found is editing the Gist directly, which is not ideal. If it would be helpful, I can make the problematic Gists public a share a link.
Also, this happens both while selecting multiple keys and changing the legend size and doing the same thing one key at a time.
Okay, interesting. I manually adjusted the Gist to fix the legend sizes and loaded it in KLE and the changes I did to the Gist were visible (the problematic keys now had the desired legend size). Then I moves some keys around in KLE, saved the layout and the changes I made to the Gist previously were removed. I guess my manual changes were correct enough to read the layout, but didn't get written back to the Gist.
Here's the Gist: https://gist.github.com/sunbart/cc8a4340999310235d170ab8a8624a1d and here's the KLE link: http://www.keyboard-layout-editor.com/#/gists/cc8a4340999310235d170ab8a8624a1d
In this particular layout, the problematic keys are: "1", "3", "_", "-" and "/"
@optozorax @Sushiimi @sunbart I can confirm that this happens to me too. It's annoying. I haven't found a solution yet.
This is my solution. I am don't know JS, therefore I deleted source algorithm of files saving and replaced it with stupid saving of all data. It solve the issue, but result file is big (> 100kB). To run server with this changes you can clone my fork and use Python 3 in the directory as python3 -m http.server 80
and visit localhost
in your browser.
Sorry for bad English.
I've been able to reproduce the issue from the original post. Seems to be a problem in the serialization logic.
Last night I found the place where it's going wrong... now I just need to fix it.