xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable
https://xieziyu.github.io/angular2-draggable/
294 stars 103 forks source link

Limit the drag zone #19

Closed dr-mohamed-benkhalifa closed 6 years ago

dr-mohamed-benkhalifa commented 6 years ago

Could be possible if we can limit the drag zone by a parent div or by pixels? For example: I want to limit zone of the draggable to the #oMap

<o-map #oMap zoom="11" min-zoom="3" max-zoom="20" zoom-control="yes" search-control="yes" draw-control="no" layer-panel-visible="false" base-layer-ids="OpenStreetMap">    
</o-map>

<div ngDraggable>
drageMe
</div>

Thanks.

xieziyu commented 6 years ago

This feature is supported in v1.1.0-beta.0. Please refer to the demo page.