[Fixed position] Incorporate numberfield control
Fix style and merge issues
This commit is contained in:
@@ -156,28 +156,6 @@ define(
|
|||||||
return this.resizeHandles;
|
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;
|
return ElementProxy;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ define(
|
|||||||
proxy.editX2 = new AccessorMutator(element, 'x2');
|
proxy.editX2 = new AccessorMutator(element, 'x2');
|
||||||
proxy.editY2 = new AccessorMutator(element, 'y2');
|
proxy.editY2 = new AccessorMutator(element, 'y2');
|
||||||
|
|
||||||
|
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user