codef0rmer/angular-dragdrop

force droppable area to accept draggrable object has class .food

m-saifuddin opened this issue · 1 comments

Hi,

I am trying to restrict a droppable element to only accept draggable object has class .food and to do that I put 'accept': .food in jqyoui-droppable attribute but this still accepting other class object.

<div class="food" data-jqyoui-options="{revert: 'invalid'}" data-drag="true" ng-model="food2" jqyoui-draggable="{animate: true}" ng-hide="!food2.title">
					<img id="fooditem" src="{{food2.src}}"/>
				</div>

<ol data-drop="true" ng-model='list2' jqyoui-droppable="{accept:'.food', onOver:'onOver'}" class="basketList">

Any help would be great.

Cheers!!

@m-saifuddin You must add the accept configurations in data-jqyoui-options not jqyoui-droppable because it's specific to angular-dragdrop not jqueryUI.