Skip to content

Commit 667bf33

Browse files
author
Stanisław
committed
Merge branch 'dev'
2 parents 8a0cb50 + e871ac8 commit 667bf33

25 files changed

+147
-98
lines changed

client/src/js/actions/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const actions = {
2424
setBootScreenState: value => state => ({ showBootScreen: value }),
2525
setMode: value => state => save('', { mode: value }),
2626

27-
settings: {
27+
settings: {
2828
setVisibility: value => state => save('settings', { isVisible: !state.isVisible }),
2929
setVisibleCategory: value => state => save('settings', {category: value }),
3030
},
@@ -43,7 +43,7 @@ const actions = {
4343
let manager = nipplejs.create({
4444
zone: el,
4545
mode: 'static',
46-
position: {left: '50%', top: '50%'},
46+
position: {right: '55%', bottom: '55%'},
4747
size: el.clientHeight,
4848
// dataOnly: true
4949
});

client/src/js/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ core(wiredActions);
2121
// This disables bouncing in iOS
2222
// https://bugs.webkit.org/show_bug.cgi?id=182521
2323
// https://stackoverflow.com/a/50856621/1589989
24-
window.addEventListener("touchmove", (event) => event.preventDefault(), {passive: false} );
24+
// this is commented out since its prevents from moving thumb on mobile devices
25+
// window.addEventListener("touchmove", (event) => event.preventDefault(), {passive: false} );

client/src/js/view/components/gripper.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { h } from 'hyperapp'
22
import { RangeInput } from "./elements/range-input";
3+
import {throttle} from 'lodash'
34

45

56
export const Gripper = ({state, action}) =>
@@ -9,7 +10,7 @@ export const Gripper = ({state, action}) =>
910
state={state}
1011
labelMax={IconGripperOpen}
1112
labelMin={IconGripperClose}
12-
oninput={(value) => action.m.setGripper(value)}
13+
oninput={(value) => setGripperThrottled(value, action)}
1314
onchange={action.gripper.setValue}/>
1415

1516
</div>
@@ -18,4 +19,6 @@ const IconGripperOpen = () =>
1819
<img src={require("../../../img/ui/gripper-opened.svg")} class="gripperControl_icons_icon"/>
1920

2021
const IconGripperClose = () =>
21-
<img src={require("../../../img/ui/gripper-closed.svg")} class="gripperControl_icons_icon"/>
22+
<img src={require("../../../img/ui/gripper-closed.svg")} class="gripperControl_icons_icon"/>
23+
24+
const setGripperThrottled = throttle((value, action) => action.m.setGripper(value), 100, { 'trailing': false });

client/src/js/view/components/joystick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { h } from 'hyperapp'
22

33
export const Joystick = ({mode, joystick, motors}) =>
44
<div class={(mode==='drive') ? 'joystick' : 'joystick joystick-hide'} oncreate={(el) => joystick({el, motors})}>
5-
<img class='joystick_image' src={require('../../../img/ui/right-krzyz.svg')}/>
5+
{/* <img class='joystick_image' src={require('../../../img/ui/right-krzyz.svg')}/> */}
66
</div>

client/src/js/view/components/manipulator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export const Manipulator = ({mode, state, action}) =>
1313
<RangeInput
1414
name='AXIS 2'
1515
state={state.axis2}
16-
oninput={(value) => setManipulator(state.axis1.value, value, action)}
16+
oninput={(value) => setManipulatorThrottled(state.axis1.value, value, action)}
1717
onchange={action.axis2.setValue}/>
1818
</div>
1919

20-
const setManipulator = throttle((axis1, axis2, action) => action.m.setAxes(axis1, axis2), 100, { 'trailing': false });
20+
const setManipulatorThrottled = throttle((axis1, axis2, action) => action.m.setAxes(axis1, axis2), 100, { 'trailing': false });

client/src/js/view/components/settings/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { h } from 'hyperapp'
2-
import {SettingsGeneral} from './general'
3-
import { SettingsNetwork } from "./network";
4-
import { SettingsManipulator } from "./manipulator";
5-
import { SettingsDebug } from "./debug";
6-
import { SettingsAbout } from "./about";
2+
import {SettingsGeneral} from './settings-general'
3+
import { SettingsNetwork } from "./settings-network";
4+
import { SettingsManipulator } from "./settings-manipulator";
5+
import { SettingsDebug } from "./settings-debug";
6+
import { SettingsAbout } from "./settings-about";
77

88
export const Settings = ({state, actions}) =>
99
<div class={(state.settings.isVisible===true) ? 'settings' : 'settings settings-hide'}>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)