Skip to content

Commit 2829eaa

Browse files
committed
v1.3.4
1 parent 7f4a783 commit 2829eaa

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Split.js",
33
"main": "split.js",
4-
"version": "1.3.3",
4+
"version": "1.3.4",
55
"homepage": "https://github.com/nathancahill/Split.js",
66
"authors": [
77
"Nathan Cahill <nathan@nathancahill.com>"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "split.js",
3-
"version": "1.3.3",
3+
"version": "1.3.4",
44
"description": "A lightweight utility for creating adjustable split views",
55
"main": "split.js",
66
"minified:main": "split.min.js",

split.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Split.js - v1.3.3 */
1+
/*! Split.js - v1.3.4 */
22

33
(function (global, factory) {
44
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -24,7 +24,7 @@ var NOOP = function () { return false; };
2424
// There's a chance that sometimes the sum of the floats would end up being slightly
2525
// larger than 100%, breaking the layout. The float fudging value is subtracted from
2626
// the percentage size.
27-
var FLOAT_FUDGING = 0.5;
27+
var FLOAT_FUDGING = 0.1;
2828

2929
// Figure out if we're in IE8 or not. IE8 will still render correctly,
3030
// but will be static instead of draggable.
@@ -105,10 +105,10 @@ var Split = function (ids, options) {
105105

106106
// Standardize minSize to an array if it isn't already. This allows minSize
107107
// to be passed as a number.
108-
var minSize = options.minSize || 100;
108+
var minSize = options.minSize !== undefined ? options.minSize : 100;
109109
var minSizes = Array.isArray(minSize) ? minSize : ids.map(function () { return minSize; });
110-
var gutterSize = options.gutterSize || 10;
111-
var snapOffset = options.snapOffset || 30;
110+
var gutterSize = options.gutterSize !== undefined ? options.gutterSize : 10;
111+
var snapOffset = options.snapOffset !== undefined ? options.snapOffset : 30;
112112
var direction = options.direction || 'horizontal';
113113
var cursor = options.cursor || (direction === 'horizontal' ? 'ew-resize' : 'ns-resize');
114114
var gutter = options.gutter || (function (i, gutterDirection) {
@@ -189,8 +189,8 @@ var Split = function (ids, options) {
189189
// Both sizes are calculated from the initial parent percentage,
190190
// then the gutter size is subtracted.
191191
function adjust (offset) {
192-
setElementSize(this.a, ((offset / this.size) * this.percentage), this.aGutterSize);
193-
setElementSize(this.b, (this.percentage - ((offset / this.size) * this.percentage)), this.bGutterSize);
192+
setElementSize(this.a, ((offset / this.size) * this.percentage) - FLOAT_FUDGING, this.aGutterSize);
193+
setElementSize(this.b, (this.percentage - ((offset / this.size) * this.percentage)) - FLOAT_FUDGING, this.bGutterSize);
194194
}
195195

196196
// drag, where all the magic happens. The logic is really quite simple:
@@ -230,8 +230,6 @@ var Split = function (ids, options) {
230230
offset = this.size - (this.bMin + this.bGutterSize);
231231
}
232232

233-
offset -= FLOAT_FUDGING;
234-
235233
// Actually adjust the size.
236234
adjust.call(this, offset);
237235

split.min.js

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

0 commit comments

Comments
 (0)