Skip to content

Commit

Permalink
Update to v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rniemeyer committed Mar 13, 2016
1 parent cdf0bde commit aa97f97
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knockout-sortable",
"version": "0.11.0",
"version": "0.12.0",
"main": "./build/knockout-sortable.min.js",
"ignore": [
"examples",
Expand Down
12 changes: 11 additions & 1 deletion build/knockout-sortable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// knockout-sortable 0.11.0 | (c) 2015 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
// knockout-sortable 0.12.0 | (c) 2016 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
;(function(factory) {
if (typeof define === "function" && define.amd) {
// AMD anonymous module
Expand Down Expand Up @@ -154,6 +154,16 @@
//keep a reference to start/update functions that might have been passed in
startActual = sortable.options.start;
updateActual = sortable.options.update;

//ensure draggable table row cells maintain their width while dragging
sortable.options.helper = function(e, ui) {
if (ui.is("tr")) {
ui.children().each(function() {
$(this).width($(this).width());
});
}
return ui;
};

//initialize sortable binding after template binding has rendered in update function
var createTimeout = setTimeout(function() {
Expand Down
4 changes: 2 additions & 2 deletions build/knockout-sortable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knockout-sortable",
"version": "0.11.0",
"version": "0.12.0",
"author": "Ryan Niemeyer",
"homepage": "https://github.com/rniemeyer/knockout-sortable",
"description": "A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality",
Expand Down
4 changes: 2 additions & 2 deletions src/knockout-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
startActual = sortable.options.start;
updateActual = sortable.options.update;

//ensure traggable table rows' cells maintain their width while dragging
//ensure draggable table row cells maintain their width while dragging
sortable.options.helper = function(e, ui) {
if (ui.is('tr')) {
if (ui.is("tr")) {
ui.children().each(function() {
$(this).width($(this).width());
});
Expand Down

0 comments on commit aa97f97

Please sign in to comment.