wix-incubator / angular-tree-control

Angular JS Tree
http://wix.github.io/angular-tree-control
MIT License
707 stars 276 forks source link

on-selection by double click #274

Closed calamarico closed 7 years ago

calamarico commented 7 years ago

Hi!

With the on-selection attribute a callback is fired when a node element is clicked. But, there is a way to instead of a simple click, fires a callback with a double click?

PD: I have a solution, using ng-dbclick passing $event and use $event.target... but my question is if inside the lib there is an easy way.

Thanks!

manojvignesh commented 7 years ago

Check this Link in documentation.

<div class="tree-label {{options.labelClass}}" ng-class="[selectedClass(), unselectableClass()]" ng-click="selectNodeLabel(node)" tree-transclude></div>

You'll find the above code if you use a custom template. There instead of ng-click="selectNodeLabel(node)" use ng-dbclick="selectNodeLabel(node)".

calamarico commented 7 years ago

thanks manojvignesh