As per #83, this implements the option strategyMove which can either be set globally via ko.bindingHandlers.sortable.strategyMove = true or by passing strategyMove: true into the sortable binding like sortable: { strategyMove: true }.
strategyMove is the best I could come-up with. :smile:
I'm not quite sure if the additions to package.json and bower.json are desired, but I just went ahead and did them since npm was complaining about the missing license field anyway.
This is a 99% re-use of what @Crunc already did in #83 - this PR is merely making it optional to get the ball rolling.
What's potentially missing is an addition to the specs, but I'm a tad lost as far as simulating draggable/sortable is concerned.
Finally, one thing I realised is that, if I see this correctly, afterAdd won't fire when strategyMove is employed since, well, it won't be added anymore - that may need to be mentioned in the docs.
P.S.: I don't know why my indenting keeps exploding like that.
As per #83, this implements the option
strategyMove
which can either be set globally viako.bindingHandlers.sortable.strategyMove = true
or by passingstrategyMove: true
into the sortable binding likesortable: { strategyMove: true }
.strategyMove
is the best I could come-up with. :smile:I'm not quite sure if the additions to package.json and bower.json are desired, but I just went ahead and did them since npm was complaining about the missing license field anyway.
This is a 99% re-use of what @Crunc already did in #83 - this PR is merely making it optional to get the ball rolling.
What's potentially missing is an addition to the specs, but I'm a tad lost as far as simulating draggable/sortable is concerned.
Finally, one thing I realised is that, if I see this correctly,
afterAdd
won't fire whenstrategyMove
is employed since, well, it won't be added anymore - that may need to be mentioned in the docs.P.S.: I don't know why my indenting keeps exploding like that.