Added back in 'light position' and 'center' with fixes for <ArrayInput/>

This also improves the usage of *-translate which uses the <ArrayInput/>
This commit is contained in:
orangemug
2019-10-19 12:16:56 +01:00
parent ab16120af2
commit 9743361e0d
5 changed files with 92 additions and 12 deletions

View File

@@ -139,6 +139,16 @@ class SettingsModal extends React.Component {
/>
</InputBlock>
<InputBlock label={"Center"} doc={latest.$root.center.doc}>
<ArrayInput
length={2}
type="number"
value={mapStyle.center}
default={latest.$root.center.default || [0, 0]}
onChange={this.changeStyleProperty.bind(this, "center")}
/>
</InputBlock>
<InputBlock label={"Zoom"} doc={latest.$root.zoom.doc}>
<NumberInput
{...inputProps}
@@ -194,6 +204,17 @@ class SettingsModal extends React.Component {
/>
</InputBlock>
<InputBlock label={"Light position"} doc={latest.light.position.doc}>
<ArrayInput
{...inputProps}
type="number"
length={latest.light.position.length}
value={light.position}
default={latest.light.position.default}
onChange={this.changeLightProperty.bind(this, "position")}
/>
</InputBlock>
<InputBlock label={"Transition delay"} doc={latest.transition.delay.doc}>
<NumberInput
{...inputProps}