Closed MwirabuaTimothy closed 9 years ago
That's by design at the moment, as I found being able to drag columns out of their parent containers caused a fair few issues in terms of UI.
If you really want to try it, look at the gm.initCanvas
function; specifically, you could try removing the 'containment: $(val)' argument on the $.each(rows)
loop. Disclaimer, haven't tried it.
Great. It seems you have to call the sortable function from the canvas level, but now from a different tag:
// Make Rows sortable canvas.sortable({ // the canvas variable references the $('#gm-canvas') tag items: rows, axis: 'y', placeholder: gm.options.rowSortingClass, handle: ".gm-moveRow", forcePlaceholderSize: true, opacity: 0.7, revert: true, tolerance: "pointer", cursor: "move" });
//Make columns sortable $('#mycanvas').sortable({ items: '.column', handle: ".gm-moveCol", forcePlaceholderSize: true, opacity: 0.7, revert: true, tolerance: "pointer", cursor: "move" });
Apparently I can only drag blocks within the same row but not into other rows. How can I allow dragging to and from anywhere?