Day 9: Drag & Drop
You can drag elements from the toolbox to the diagram canvas. If the dragged element is a relationship, you can see the preview of the final position during the dragging. You may drop the relationship over a node element to insert a self-relationship.
If you drag&drop a node tool from the toolbox over a connector tool, you will activate a special tool that allows you to insert multiple nodes connected with the chosen relationship to a diagram.
Drag & Drop Using Right Button
If you drag an existing element in the diagram editor, it will change its position within the diagram accordingly. However, what to do if you want to move the element to another diagram. It is also possible, but instead of the standard drag&drop with the left mouse button pressed, you have to hold the right mouse button. The right-button drag&drop allows you to move an element over an open diagram tab – it will switch the editor to this diagram and then you can place the element into the diagram.
There are also other scenarios when you may find the right-button drag&drop very useful within a single diagram too. You may right-drag the element over another element to invoke a context menu with helpful actions:
- Create a connector from the dragged element to the hover (target) element – various available types of connectors are listed in the menu.
- Copy the style of the dragged element to the target element – if the elements already have the same style, this option will be not listed in the context menu.
If you drop the dragged element over an empty space in the diagram, you may use one of these actions from the context menu:
- Copy Here (Shared Model) – creates a copy of the dragged element so they will share a model.
- Copy Here (Independent) – creates a completely independent copy, the element will be copied as well and will be not shared with the dragged element.
- Create a new element with a connector to the dragged element (e.g. a superclass)
You may drag&drop an object from another application. Currently, there are two kinds of objects supported:
- Software Ideas Modeler Project – if you drop a SIM project file over the main window, it will open the project.
- Images – it is possible to insert an image to the diagram using drag&drop from the system file manager.
The project tree supports drag&drop. You may drag folders, diagrams and elements to reorganize them. This way you may change the folder nesting, move a diagram to another folder, move an element to another diagram or change the position of folders/diagrams/elements among other nested items.
Except for editing projects and diagrams, you may use drag&drop to manipulate the user interface. You may change the order of the open tabs in the tab bar. You may even drag a tab out of the main window to its separate window, which you can also place to another screen.
Software Ideas Modeler provides multiple sidebars. Using drag&drop, you may change their positions. The sidebar does not have to be docked only to the right side (that is the default position), you may move it also to the left or let it occupy a separate window.