jadrake75 / ng-scrolling-table

MIT License
8 stars 2 forks source link

Column Reordering #8

Closed Xanir closed 9 years ago

Xanir commented 10 years ago

Be able to reorder columns.

This would require reordering the Angular template for the header and data columns and then re-rendering them

Xanir commented 10 years ago

How should reordering be handled? Through drag and drop or a separate UI?

If drag and drop should there be a space between the headers where the drop would occur?

coffbr01 commented 10 years ago

Drag & drop seems intuitive.

Making a space between headers where the drop would occur would look slick. Otherwise something like this is an option: http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/array-grid.html

jadrake75 commented 10 years ago

We could just do a drop zone (it could be as simple as adding a transparent div on the fly absolute positioned when you start to drag and end/exit a column..... ie. we don't need spacers.... it could be an on-the-fly DOM addition

Xanir commented 10 years ago

Drag and drop angular service: http://logicbomb.github.io/ng-directives/drag-drop.html

jadrake75 commented 10 years ago

I would be ok with using an existing service as long as it does not drag in a bunch of other dependencies.

Xanir commented 10 years ago

There are 2 files, the drag and drop directive and a UUID factory. It just requires an angular factory called 'uuid' that has a method called new. We could make your UUID factory work or use the one here: https://github.com/logicbomb/lvlDragDrop/tree/master/script

Xanir commented 9 years ago

Implemented by: bb7863a0e32366c4885e232dc18a38a5e9e911e0