1
- /*! Split.js - v1.3.3 */
1
+ /*! Split.js - v1.3.4 */
2
2
3
3
( function ( global , factory ) {
4
4
typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) :
@@ -24,7 +24,7 @@ var NOOP = function () { return false; };
24
24
// There's a chance that sometimes the sum of the floats would end up being slightly
25
25
// larger than 100%, breaking the layout. The float fudging value is subtracted from
26
26
// the percentage size.
27
- var FLOAT_FUDGING = 0.5 ;
27
+ var FLOAT_FUDGING = 0.1 ;
28
28
29
29
// Figure out if we're in IE8 or not. IE8 will still render correctly,
30
30
// but will be static instead of draggable.
@@ -105,10 +105,10 @@ var Split = function (ids, options) {
105
105
106
106
// Standardize minSize to an array if it isn't already. This allows minSize
107
107
// to be passed as a number.
108
- var minSize = options . minSize || 100 ;
108
+ var minSize = options . minSize !== undefined ? options . minSize : 100 ;
109
109
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 ;
112
112
var direction = options . direction || 'horizontal' ;
113
113
var cursor = options . cursor || ( direction === 'horizontal' ? 'ew-resize' : 'ns-resize' ) ;
114
114
var gutter = options . gutter || ( function ( i , gutterDirection ) {
@@ -189,8 +189,8 @@ var Split = function (ids, options) {
189
189
// Both sizes are calculated from the initial parent percentage,
190
190
// then the gutter size is subtracted.
191
191
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 ) ;
194
194
}
195
195
196
196
// drag, where all the magic happens. The logic is really quite simple:
@@ -230,8 +230,6 @@ var Split = function (ids, options) {
230
230
offset = this . size - ( this . bMin + this . bGutterSize ) ;
231
231
}
232
232
233
- offset -= FLOAT_FUDGING ;
234
-
235
233
// Actually adjust the size.
236
234
adjust . call ( this , offset ) ;
237
235
0 commit comments