0
내 프로젝트 중 하나에서 'd3.dispatch'기능을 사용하려고합니다. 사용자 지정 이벤트를 설정하고 네임 스페이스를 사용하여 사용 가능한 청취자에게 보냅니다. 네임 스페이스가있는 사용자 정의 이벤트 전달
내가이 짓 :var dispatcher = d3.dispatch("period_selected"); brush.on("brush", function() { var s = brush.extent() // patch the event to listeners dispatcher.period_selected(s); }); // register listener for the event namespaced dispatcher.on("period_selected.my_namespace", function(s,f) { console.log(event.period_selected); });
을하지만 결과로와 네임 스페이스를 다시 얻을 수 없습니다. 너는 어떤 생각을 가지고 있니? 사전