Resizable: update resizable handle position after init. Fixes #1207

This commit is contained in:
Rob Garrison 2016-05-04 11:57:29 -05:00
parent 6d76080f8e
commit 715fe7842c
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
2 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -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';