cedvdb / ng2draggable

draggable directive for angular 2
https://cedvdb.github.io/ng2draggable/
MIT License
18 stars 16 forks source link

How to move entire panel with draggable option enabled only on heading part? #5

Closed sanket360 closed 7 years ago

sanket360 commented 7 years ago

I got your directive from your answer posted on http://stackoverflow.com/questions/36273791/how-to-implement-a-draggable-div-in-angular-2-using-rx

In my case, I am trying to move panel using panel heading with your ng2-draggable directive. Sample code below-

<div id="panel1" class="panel panel-primary resizable" >
  <div class="panel-heading" [ng2-draggable]=true>
    Handler for dragging
  </div>
  <div class="panel-body">
    Draggable and resizable content
  </div>
</div>

However, above code moves only panel heading and not entire panel.

Could you please suggest how to move entire panel with draggable option enabled only on heading part?

cedvdb commented 7 years ago

@sanket360 I changed the name of the input you used. I feel like handle is more appropriate than target. https://github.com/cedvdb/ng2draggable#drag-element-with-child-element

sanket360 commented 7 years ago

Thanks @cedvdb :+1: