codef0rmer / angular-dragdrop

Implementing jQueryUI Drag and Drop functionality in AngularJS (with Animation) is easier than ever
http://codef0rmer.github.com/angular-dragdrop/#/
MIT License
1.78k stars 574 forks source link

Having problems implemeting visual feedback on droppable area #317

Closed rodrigovallades closed 7 years ago

rodrigovallades commented 7 years ago

Hi!

The documentation says that data-jqyoui-options object should hold all the valid options supported by jQueryUI Droppable.

I'm having a hard time using the droppable "classes" attribute, as described in http://jqueryui.com/droppable/#visual-feedback.

I tried something like this:

<div data-drop="true" data-jqyoui-options="classes: { 'ui-droppable-active': 'ui-state-default'}" jqyoui-droppable>

But I'm getting a syntax error:

Error: [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 8 of the expression [classes: { 'ui-droppable-active': 'ui-state-default'}] starting at [: { 'ui-droppable-active': 'ui-state-default'}].

What I'm trying to achieve is visual feedback on the droppable area as soon as I start dragging an element.

Any help?

codef0rmer commented 7 years ago

Use this way,

data-jqyoui-options="{classes: { 'ui-droppable-active': 'ui-state-default'}}"
rodrigovallades commented 7 years ago

Thank you, I was missing the extra brackets.

But even then, I'm not getting the expected result. The systax error is gone, though.

I'll keep trying.

codef0rmer commented 7 years ago

@rodrigovallades Yeah, never stop trying 👍

jambway commented 4 years ago

$scope.optionsList1 = { activeClass: 'ui-state-hover', hoverClass: 'ui-state-active', };