How can I custom the style of the dragging element?

I make a custom element, which contains a rect with background color. But when I dragging the custom element, the moving element is turn white. Show as the picture.
image
And, I also want to custom the connection style when connecting two shape. Like I wanna the connection is dash when connecting, solid when connected.
How could I achieve it? Do I need to override the Dragging module?
Thank you for your help!

Are you able to share your custom element inside a CodeSandbox?

May be you can see my customRender in this dawn-glitter-e66xzt - CodeSandbox. I have just rewritten the render module for u can test the style when dragging element. My demand is to keep the background color of the rect but reduce the opacity to 0.6 or other. I hope there is a way to achieve this.

The dragging styles are handled via the MovePreview module. It’s setting markers to set the specific styles (e.g. djs-dragging). You can update these styles via CSS.

Thank u for your help. I custom the dragging styles by rewriting own diagram-js.css and achieve it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.