In my code I am using the Diagram to show a series of options to a user, in a hierarchical format. The data source gets its info from a web call, and the visual template is simply a rectangle and some text. I create the diagram with the following options:
The "selectFunc" simply sees if the click occurred on an item, and if so, sets a variable to that item for later retrieval.
What I want to be able to do is treat this diagram as single selection only. So, how do I:
1) Disable mouse selection rectangle? If you click and drag the mouse, a selection rectangle forms that will select all shapes it intersects.
2) Disable [CTRL]-Click, which allows multiple selection? In my selectFunc method, I undo the multiple selection and only select the last clicked on item, but the user still sees the multi-select action occur.
3) Make the diagram resizable? It seems if I do not specify an explicit width and height in CSS, the diagram will draw larger than the <div> it is contained within; and my attempts to use CSS to specify margins is also mostly ignored.
4) I utilize the "bringIntoView" method with a parameter of the first shape in the collection to make sure the diagram shows at least the first object in the hierarchy, but can I also specify to show it centered at the top of the available space?
Thanks in advance!