Creating a shape in a fixed postion in order to make drag & drop

Hello,

I am making a diagram editor (with a grid), and I’d like to set some shapes on a grid, that couldn’t be moved, having a fixed position relativily to the diagram zone, not the grid.

What I want to do is place some predefined shapes on the left side of the grid, to be able to drag them with CTRL+move. And when moving across the grid and other objects, I want these objects to stay settled there. I just want to avoid creating two diagrams.

If you have any other idea to implement a drag’n’drop quickly it would be a pleasure.

Thanks for your help :)

I am unsure of what you want that is different from a Palette. Could you show some before-and-after screenshots for what you want?

Also do you know about Part.movable and other permission properties? GoJS User Permissions -- Northwoods Software

Thanks for your attention walter. The permissions could be very useful.

In fact here’s an image of what I want to do.

In fact I want to be able to make a palette, where I could drag and drop the objects into my diagram (with CTRL+move). I want the palette to stay in a fixed position (an area like the green frame I drew).

If you know an easy way to make a palette inside the Brown zone, tell me more about it.

PS : I have another question please, is it possible to add properties to the nodes ?

Thanks for your patience !

So you want to be able to scroll and zoom the nodes in your “palette-like area” along with the nodes and links in the main diagram? Then you cannot use a second Diagram such as a Palette. On the other hand, if they should remain in a fixed position relative to the main Diagram and if they should not be scrolled or zoomed along with the rest of the main Diagram, then you should use a Palette. Read about GoJS Palette -- Northwoods Software and GoJS Legends and Titles -- Northwoods Software.

Assuming you do not want to use a Palette, you could create a Group containing a bunch of nodes that you make not Part.movable and not Part.deletable. Presumably the Group itself would also be not movable nor deletable, and probably not selectable, but you have the flexibility to do what you want.

Yes, in the node data object in the model you can add as many properties as you like. GoJS Using Models -- Northwoods Software.

Thanks for all the advices ! Everything is clear and concise !

Is it possible for the group to be in a fixed position?
for example, in css it would be something like position: fixed, top: 50%; left: 0, so even if the user scrolls the viewport, the group would stay in the same place in the browser window

Please read the page that I referred to above: GoJS Legends and Titles -- Northwoods Software