Skip to content

Tag: javascript

Wrapping Text in D3

I would like to get the text to wrap on the following D3 tree so that instead of each line is wrapped to I have tried making the text a ‘foreignObject’ rather than a text object and the text does indeed wrap, but it doesn’t move on the tree animation and is all grouped in the upper left hand…

Loop through childNodes

I’m trying to loop through childNodes like this: However, it output Uncaught TypeError: undefined is not a function due to forEach function. I also try to use children instead of childNodes but nothing changed. Does anybody know what’s going on? Answer The variable children is a NodeList instance …

Bootstrap addon create options button with arbitrary js

I figured out from Bugzilla that you can set your options url in install.rdf to arbitrary js and it will run perfectly fine. The only issue is that the window deactivates, its as if an invisible dialog has opened over it, and no matter what you can’t close it. For example: In my addon here: simple test …