How to simulate drag for rectangle with text

i wanted to simulate drag for text (Simulate Above rect Drag) which should work as similar to rectangle symbol drag.

The below image illustrate it:

enter image description here

I’m tweaking opensource source project. so don’t know much code. hence i’m giving project link.

project link: https://www.dropbox.com/s/mfrvzdum9aur0wl/webapp.tar.gz?dl=0

How to run:

  1. open with vscode.

  2. find index.html run with liveserver. you will get above interface(shown in pic).

How to simulate drag for rectangle with text