0

How can i make dblClick and click events on the selection?

  serverIcons.filter(function(d) {
            return d.linktoLayermodel
        }).on('click', function(d) {
            if (d3.event.defaultPrevented) return;
            alert('click');

        }).on('dblclick', function(){alert('dblclick');});

But when do dblclick it alerts me 'click'

ferozcoder
  • 454
  • 5
  • 18
  • 1
    Did you research this ? Took me 2 seconds to find an answer : http://stackoverflow.com/questions/18307185/d3-how-do-i-set-click-event-and-dbclick-event-at-the-same-time – AJ_91 Apr 13 '15 at 09:05
  • Ya i got the solution from above link :)http://stackoverflow.com/questions/1546040/how-to-use-both-onclick-and-ondblclick-on-an-element – ferozcoder Apr 13 '15 at 09:13

0 Answers0