mirror of
https://github.com/nasa/openmct.git
synced 2025-04-13 22:23:13 +00:00
[Fixed position] Incorporate numberfield control
Fix style and merge issues
This commit is contained in:
parent
a6079936e8
commit
825f50262c
@ -156,28 +156,6 @@ define(
|
||||
return this.resizeHandles;
|
||||
};
|
||||
|
||||
/**
|
||||
* Ensure and input type is numeric: intended to be passed as the
|
||||
* updater argument to an AccessorMutator object in order to restrict
|
||||
* input to integer values only.
|
||||
* @return Either the string '' (for no input), the new value passed in,
|
||||
* or the current value of the new value is invalid.
|
||||
*/
|
||||
ElementProxy.prototype.checkNumeric = function (value, current) {
|
||||
var intValue = parseInt(value);
|
||||
// Handle case of empty field by swapping in 0
|
||||
if (value === '') {
|
||||
return 0;
|
||||
}
|
||||
// Else, check if the input is integral, and not, return current value
|
||||
// of the field
|
||||
if (isNaN(intValue)) {
|
||||
return current;
|
||||
} else {
|
||||
return intValue;
|
||||
}
|
||||
};
|
||||
|
||||
return ElementProxy;
|
||||
}
|
||||
);
|
||||
|
@ -154,7 +154,6 @@ define(
|
||||
proxy.editX2 = new AccessorMutator(element, 'x2');
|
||||
proxy.editY2 = new AccessorMutator(element, 'y2');
|
||||
|
||||
|
||||
return proxy;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user