javascript - d3: only two "on" possible? -
Using D.JS, I have a strange problem. The following code works fine: < pre> But, I also want to zoomhandler another inactive, so I tried to expand the code like this: But now, at runtime, I get an exception Why can I add only two listeners but not three? Your problem is the number of events, this event type "other avant" (or whatever you type in your code Are using)). Zoom behavior only supports: are supported as follows: var zoomHandler = d3.behavior.zoom () .scaleExtent ([min, max]) .on ("zoom", function () {// do something;}). ("Zumen", function () {// do something;});
< code> var zoomHandler = d3.behavior. Zoom () .scaleExtent ([min, max]) .on ("zoom", function () {// do something;}). ("Zoomed", function () {// do something;}) ("Other Event", blank);
Uncort type type: 'can not read' on unchanged property < / Pre>
Comments
Post a Comment