Dragging into a grid stack from a sidebar
Is there any way to drag an item into a grid stack from a sidebar?
Try using jquery ui droppable.
On Tuesday, February 17, 2015, David Neilsen [email protected] wrote:
Is there any way to drag an item into a grid stack from a sidebar?
Reply to this email directly or view it on GitHub https://github.com/troolee/gridstack.js/issues/69.
But can it use the placeholder in this case?
Hi,
gridstack doesn't have such functionality but I think I can implement it.
Would be very useful :+1:
+1, this would definitely make me use it over gridster.
+1
+1
important feature, серьезно
Will be сделано самой первой in 0.2.4
//wbr Pavel Reznikov [email protected]
On Fri, Mar 13, 2015 at 2:34 PM, Yaroslav [email protected] wrote:
important feature, серьезно
— Reply to this email directly or view it on GitHub https://github.com/troolee/gridstack.js/issues/69#issuecomment-79429097.
I am not expert in jQuery or JS, but just thinking: if the grid-stack-item-content is made to hold an internal jquery ui droppable element it may just start working and accepting the drops (Not sure, but should be close to the solution).
Also, on a side note, came across this very nice drag -drop effects design, and just thought of sharing, for inspiration: http://tympanus.net/Development/DragDropInteractions/sidebar.html
I tried as below and am able to make drag-drop work within a widget - but dropping from outside/side-bar looks like need some expert.
<div class="grid-stack-item"
data-gs-x={{x}} data-gs-y={{y}}
data-gs-width={{width}} data-gs-height={{height}}
data-panel-id={{_id}} data-content-id={{contentId}}>
<div class="grid-stack-item-content panel panel-default">
<div class="panel-body ">
<div>
<ul id ="droppable" class="ui-widget-header columnsContainer2" style="height:100%;">
<li>item1 </li>
<li>item2</li>
<li>item3</li>
</ul>
<p>Drop here</p>
</div>
</div>
</div>
</div>
JS code
$("#droppable").sortable({
revert: true,
distance: 8,
connectWith: $('.columnsContainer2'),
receive: function (ev, ui) {
console.log("received");
}
});
+1 for this. Awesome plugin by the way
+1 important feature. Any update on this enhancement?
+1
+1
+1 thats would be nice to have this feature while building UI
+1 or at least a guidance
+1
+1 Would be an awesome feature
We're working on it. I'm closing the issue because we have another same issues #133 just to clean a mess in issues