Skip to content
This repository was archived by the owner on Aug 3, 2022. It is now read-only.

Commit 764023f

Browse files
committed
3.4.1
1 parent 65e81ca commit 764023f

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.4.1
4+
5+
- Don't fill switch to 100% of parent height [#5](https://github.com/Julusian/react-bootstrap-switch/pull/5) Thanks to timchang
6+
- Switch should toggle when label is clicked [#5](https://github.com/Julusian/react-bootstrap-switch/pull/5) Thanks to timchang
7+
38
## 3.4.0
49

510
- Remove calls to .getDOMNode() [#3](https://github.com/Julusian/react-bootstrap-switch/pull/3) Thanks to jking90

dist/css/bootstrap2/react-bootstrap-switch.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* react-bootstrap-switch - v3.3.4
2+
* react-bootstrap-switch - v3.4.1
33
* https://github.com/Julusian/react-bootstrap-switch
44
* ========================================================================
55
* Copyright 2012-2015 Julian Waller
@@ -79,7 +79,6 @@
7979
box-sizing: border-box;
8080
cursor: pointer;
8181
display: inline-block !important;
82-
height: 100%;
8382
padding-top: 4px;
8483
padding-bottom: 4px;
8584
padding-left: 8px;

dist/css/bootstrap2/react-bootstrap-switch.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap3/react-bootstrap-switch.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* react-bootstrap-switch - v3.3.4
2+
* react-bootstrap-switch - v3.4.1
33
* https://github.com/Julusian/react-bootstrap-switch
44
* ========================================================================
55
* Copyright 2012-2015 Julian Waller
@@ -44,7 +44,6 @@
4444
box-sizing: border-box;
4545
cursor: pointer;
4646
display: inline-block !important;
47-
height: 100%;
4847
padding: 6px 12px;
4948
font-size: 14px;
5049
line-height: 20px;

dist/css/bootstrap3/react-bootstrap-switch.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/react-bootstrap-switch.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ========================================================================
2-
* react-bootstrap-switch - v3.3.4
2+
* react-bootstrap-switch - v3.4.1
33
* https://github.com/Julusian/react-bootstrap-switch
44
* ========================================================================
55
* Copyright 2012-2015 Julian Waller
@@ -338,7 +338,8 @@
338338
return;
339339
}
340340
return _this.setState({
341-
offset: difference + "px"
341+
offset: difference + "px",
342+
dragged: true
342343
});
343344
};
344345
})(this),
@@ -350,13 +351,14 @@
350351
}
351352
e.preventDefault();
352353
state = !_this.state.state;
353-
difference = parseInt(_this.state.offset);
354-
if (difference) {
354+
if (_this.state.dragged) {
355+
difference = parseInt(_this.state.offset);
355356
state = difference > -(_this.state.handleWidth / 2);
356357
state = _this._prop('inverse') ? !state : state;
357358
}
358359
return _this.setState({
359360
dragStart: false,
361+
dragged: false,
360362
state: state
361363
}, function() {
362364
_this._containerPosition();

0 commit comments

Comments
 (0)