I have some software that I would like to move onto the web by making it run in a browser. The software that I have is based on drawing a 2D diagram by dropping blocks onto the screen and then connecting the blocks with lines to define logic flow. Similar to how Unreal's blueprint visual scripting works.

Does anyone know of some web api that I could code against to make this happen? I don't want to recreate the wheel if someone has already invented it. Sample website that have the functionality that I need include:

http://www.digikey.ca/schemeit

https://www.circuitlab.com/editor

https://easyeda.com/editor