GraphObject.width and .height are just “abbreviations” for GraphObject.desiredSize.width and .desiredSize.height. Most objects never get their desiredSize set to any value and the default value is NaN x NaN. Usually the only use of GraphObject.width or .height is to set it when initializing an object.
You probably want to use the GraphObject.actualBounds or the GraphObject.naturalBounds, depending on your purpose. What are you trying to do?
Well I’m recreating a whole mindmapping system.
The idea is when a node is selected, 2 buttons are shown (left and right of the node).
The left button would popup a window/panel with more options (like bold, italic, alignment, color, …)
Its for it’s location that I need the width of it. Or is there an easier solution?
Just create a custom Adornment for the node (.selectionAdornmentTemplate). In fact, the MindMap sample demonstrates this already, although with just a single button. No code needed (except for your button click event handler, of course).