lukaskleinschmidt / kirby-sortable

Making subpage managing a breeze
79 stars 6 forks source link

Drag axis #32

Closed iskrisis closed 7 years ago

iskrisis commented 7 years ago

Just question, in the settings of jquery ui sortable https://github.com/lukaskleinschmidt/kirby-sortable/blob/master/fields/sortable/assets/js/sortable.js#L11-L12

is there reason there is no axis: 'y' ? I mean it might be little aesthetic nuance, but i end up changing it in the plugin all the time. For the sortable usecase i think you don't want "module blocks" to move everywhere.

lukaskleinschmidt commented 7 years ago

Actually I was not aware of that option. The goal was to be as close to the native drag and drop behaviour kirby ships with (subpage ordering, structure field …). I will not change the default behaviour because I have a connected sortable fields feature in the pipeline that will need this behaviour.

Perhaps I add a config somewhere to modify the js initiation. But honestly I'm not sure about that. I will have a closer look at this when I find the time.

iskrisis commented 7 years ago

Its true that its kirbys default for draggalbe behavior. Maybe i should also post i there.

Paradox is that if you are working on some kind of "nesting" of modules, then this might actually be prefered behavior but in kirby default fields its not needed.

But i guess its just details.

lukaskleinschmidt commented 7 years ago

Yeah it's hard to get it right for everyone 😉 But the small details are often the ones that bug one the most. Have you considered creating a customized field? You could easily add any additions or changes there so you don't have to do it in the plugin core.