mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Resizable: update resizable handle position after init. Fixes #1207
This commit is contained in:
parent
6d76080f8e
commit
715fe7842c
2
dist/js/widgets/widget-resizable.min.js
vendored
2
dist/js/widgets/widget-resizable.min.js
vendored
File diff suppressed because one or more lines are too long
@ -102,7 +102,6 @@
|
|||||||
.bind( 'selectstart', false );
|
.bind( 'selectstart', false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ts.resizable.setHandlePosition( c, wo );
|
|
||||||
ts.resizable.bindings( c, wo );
|
ts.resizable.bindings( c, wo );
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -152,12 +151,11 @@
|
|||||||
|
|
||||||
setHandlePosition : function( c, wo ) {
|
setHandlePosition : function( c, wo ) {
|
||||||
var startPosition,
|
var startPosition,
|
||||||
hasScroller = ts.hasWidget( c.table, 'scroller' ),
|
|
||||||
tableHeight = c.$table.height(),
|
tableHeight = c.$table.height(),
|
||||||
$handles = wo.$resizable_container.children(),
|
$handles = wo.$resizable_container.children(),
|
||||||
handleCenter = Math.floor( $handles.width() / 2 );
|
handleCenter = Math.floor( $handles.width() / 2 );
|
||||||
|
|
||||||
if ( hasScroller ) {
|
if ( ts.hasWidget( c.table, 'scroller' ) ) {
|
||||||
tableHeight = 0;
|
tableHeight = 0;
|
||||||
c.$table.closest( '.' + ts.css.scrollerWrap ).children().each(function(){
|
c.$table.closest( '.' + ts.css.scrollerWrap ).children().each(function(){
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
@ -340,6 +338,9 @@
|
|||||||
init: function(table, thisWidget, c, wo) {
|
init: function(table, thisWidget, c, wo) {
|
||||||
ts.resizable.init( c, wo );
|
ts.resizable.init( c, wo );
|
||||||
},
|
},
|
||||||
|
format: function( table, c, wo ) {
|
||||||
|
ts.resizable.setHandlePosition( c, wo );
|
||||||
|
},
|
||||||
remove: function( table, c, wo, refreshing ) {
|
remove: function( table, c, wo, refreshing ) {
|
||||||
if (wo.$resizable_container) {
|
if (wo.$resizable_container) {
|
||||||
var namespace = c.namespace + 'tsresize';
|
var namespace = c.namespace + 'tsresize';
|
||||||
|
Loading…
Reference in New Issue
Block a user