ijprest / keyboard-layout-editor

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

Export to JSON may loose float values accuracy #335

Open adamws opened 1 year ago

adamws commented 1 year ago

Exporting json from following layout (two first keys of Kinesis Advantage preset):

[{f:1,f2:2,w:0.675,h:0.85},"\nEsc",{x:0.075,w:0.675,h:0.85},"\nF1"],

results in following json file:

[
  [
    {
      "f": 1,
      "f2": 2,
      "w": 0.675,
      "h": 0.85
    },
    "\nEsc",
    {
      "x": 0.07499999999999996,
      "w": 0.675,
      "h": 0.85
    },
    "\nF1"
  ]
]

x property of second key lost accuracy.