ui-kit-ck-consultant 0.5.277 → 0.5.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +5 -5
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +8 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -4285,7 +4285,7 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4285
4285
|
_this = _React$Component.call(this, props) || this;
|
4286
4286
|
|
4287
4287
|
_this.eventMouseUp = function () {
|
4288
|
-
if (_this.state.
|
4288
|
+
if (_this.state.isActive) {
|
4289
4289
|
_this.setState({
|
4290
4290
|
isActive: false
|
4291
4291
|
});
|
@@ -4302,7 +4302,13 @@ var Gauge = /*#__PURE__*/function (_React$Component) {
|
|
4302
4302
|
var width = currentTargetRect.width;
|
4303
4303
|
var positionX = e.pageX - currentTargetRect.left;
|
4304
4304
|
var step = _this.props.step ? _this.props.step : 1;
|
4305
|
-
var position = positionX * 100 / width - positionX * 100 / width % step;
|
4305
|
+
var position = Math.round(positionX * 100 / width) - Math.round(positionX * 100 / width) % step;
|
4306
|
+
|
4307
|
+
if (position > 100) {
|
4308
|
+
position = 100;
|
4309
|
+
} else if (position < 0) {
|
4310
|
+
position = 0;
|
4311
|
+
}
|
4306
4312
|
|
4307
4313
|
_this.setState({
|
4308
4314
|
position: position
|