jongyoul commented on code in PR #4788: URL: https://github.com/apache/zeppelin/pull/4788#discussion_r1722610780
########## zeppelin-web/src/app/visualization/builtins/visualization-d3network.js: ########## @@ -166,20 +166,20 @@ export default class NetworkVisualization extends Visualization { const drag = d3.behavior.drag() .origin((d) => d) - .on('dragstart', function(d) { + .on('dragstart', (d) => { console.log('dragstart'); d3.event.sourceEvent.stopPropagation(); d3.select(this).classed('dragging', true); self.force.stop(); }) - .on('drag', function(d) { + .on('drag', (d) => { console.log('drag'); d.px += d3.event.dx; d.py += d3.event.dy; d.x += d3.event.dx; d.y += d3.event.dy; }) - .on('dragend', function(d) { + .on('dragend', (d) => { console.log('dragend'); d.fixed = true; d3.select(this).classed('dragging', false); Review Comment: Wow! It's quite new for me. I don't get it completely but it looks like a similar kind of problem with closures and scoping between arrow and function. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org