mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-02-06 17:05:38 +01:00
More logging additional attempt at fixes.
This commit is contained in:
parent
cd162309a8
commit
5aa0b4e7d9
1 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,11 @@ class NumberInput extends React.Component {
|
||||||
|
|
||||||
onChangeRange = (e) => {
|
onChangeRange = (e) => {
|
||||||
console.log(">> onChangeRange");
|
console.log(">> onChangeRange");
|
||||||
|
if (this._cancelNextChangeEvent) {
|
||||||
|
console.log("onChangeRange:cancel");
|
||||||
|
this._cancelNextChangeEvent = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const value = parseFloat(e.target.value, 10);
|
const value = parseFloat(e.target.value, 10);
|
||||||
const step = this.props.rangeStep;
|
const step = this.props.rangeStep;
|
||||||
let dirtyValue = value;
|
let dirtyValue = value;
|
||||||
|
@ -133,7 +138,12 @@ class NumberInput extends React.Component {
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
value={rangeValue}
|
value={rangeValue}
|
||||||
onInput={this.onChangeRange}
|
onInput={this.onChangeRange}
|
||||||
|
onMouseUp={() => console.log("mouseup")}
|
||||||
|
onPointerDown={() => {
|
||||||
|
this._cancelNextChangeEvent = false;
|
||||||
|
}}
|
||||||
onPointerUp={() => {
|
onPointerUp={() => {
|
||||||
|
this._cancelNextChangeEvent = true;
|
||||||
console.log(">> onPointerUp");
|
console.log(">> onPointerUp");
|
||||||
const {dirtyValue} = this.state;
|
const {dirtyValue} = this.state;
|
||||||
const hasChanged = this.state.props !== dirtyValue
|
const hasChanged = this.state.props !== dirtyValue
|
||||||
|
|
Loading…
Reference in a new issue