mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-25 17:17:43 +00:00
Minor documentation tweaks.
This commit is contained in:
parent
7df91d5f17
commit
a30b08d01f
2 changed files with 4 additions and 7 deletions
|
|
@ -47,11 +47,8 @@ namespace com.keyman.osk {
|
|||
}
|
||||
}
|
||||
|
||||
// Calculate actual key widths by summing defined widths and scaling each key to %,
|
||||
// adjusting the width of the last key to make the total exactly 100%
|
||||
// Calculate percentage-based scalings by summing defined widths and scaling each key to %.
|
||||
// Save each percentage key width as a separate member (do *not* overwrite layout specified width!)
|
||||
// NB: the 'percent' suffix is historical, units are percent on desktop devices, but pixels on touch devices
|
||||
// All key widths and paddings are rounded for uniformity
|
||||
var keyPercent: number, padPercent: number, totalPercent=0;
|
||||
for(let j=0; j<keys.length-1; j++) {
|
||||
keyPercent=parseInt(keys[j]['width'],10)/totalWidth;
|
||||
|
|
|
|||
|
|
@ -762,9 +762,9 @@ namespace com.keyman.osk {
|
|||
// Apply defaults, setting the width and other undefined properties for each key
|
||||
keys=row['key'];
|
||||
|
||||
// Calculate actual key widths by summing defined widths and scaling each key to %,
|
||||
// adjusting the width of the last key to make the total exactly 100%
|
||||
// Save each percentage key width as a separate member (do *not* overwrite layout specified width!)
|
||||
// Calculate actual key widths by multiplying by the OSK's width and rounding appropriately,
|
||||
// adjusting the width of the last key to make the total exactly 100%.
|
||||
// Overwrite the previously-computed percent.
|
||||
// NB: the 'percent' suffix is historical, units are percent on desktop devices, but pixels on touch devices
|
||||
// All key widths and paddings are rounded for uniformity
|
||||
var keyPercent: number, padPercent: number, totalPercent=0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue