aboutsummaryrefslogtreecommitdiff
path: root/src_js/vt.js
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2022-01-03 00:58:17 +0100
committerbozo.kopic <bozo@kopic.xyz>2022-01-03 00:58:17 +0100
commitae33b2c75ec0e03fd1d80241a4c4b29acadb517c (patch)
treefa86a159bafb6ea5c1605cd66a67f8be5a24ba3e /src_js/vt.js
parent1a73bd946b8636dbcbb2970c8f8e919b888074ab (diff)
calculate native implementation
Diffstat (limited to 'src_js/vt.js')
-rw-r--r--src_js/vt.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/src_js/vt.js b/src_js/vt.js
index ce16d3d..878280f 100644
--- a/src_js/vt.js
+++ b/src_js/vt.js
@@ -3,7 +3,6 @@ import * as u from '@hat-open/util';
import * as common from './common';
import * as dragger from './dragger';
-import * as states from './states';
export function main() {
@@ -23,7 +22,7 @@ function leftPanelResizer() {
mousedown: dragger.mouseDownHandler(evt => {
const panel = evt.target.parentNode.querySelector('.left-panel');
const width = panel.clientWidth;
- return (_, dx, __) => {
+ return (_, dx) => {
panel.style.width = `${width + dx}px`;
};
})
@@ -38,7 +37,7 @@ function rightPanelResizer() {
mousedown: dragger.mouseDownHandler(evt => {
const panel = evt.target.parentNode.querySelector('.right-panel');
const width = panel.clientWidth;
- return (_, dx, __) => {
+ return (_, dx) => {
panel.style.width = `${width - dx}px`;
};
})
@@ -72,7 +71,11 @@ function leftPanel() {
['label'],
checkboxInput('Minimize initial panel usage',
r.get('form', 'min_initial_usage'),
- val => r.set(['form', 'min_initial_usage'], val))
+ val => r.set(['form', 'min_initial_usage'], val)),
+ ['label'],
+ checkboxInput('Use native implementation',
+ r.get('form', 'native'),
+ val => r.set(['form', 'native'], val))
],
['div.content',
leftPanelPanels(),
@@ -99,7 +102,7 @@ function leftPanelPanels() {
const valid = !panelNames.has(name);
panelNames.add(name);
return valid;
- }
+ };
return ['div',
['table',
@@ -198,7 +201,7 @@ function leftPanelItems() {
const valid = !itemNames.has(name);
itemNames.add(name);
return valid;
- }
+ };
return ['div',
['table',