@electronicwhisper: Please take a quick look at my approach here.
Basic account of changes:
I made Canvas into ApparatusCanvas, a more generic diagram-renderer which can be used for the editor, the create-panel thumbnails, and embeddings. I added a bunch of flags to turn on and off different features. I am a little worried about this getting messy, but I think it's important to have the code in one place. Changes to the canvas should always be made with some consideration given to these different rendering contexts.
I factored some other stuff out of the editor so that embeddings could use them: Model.SerializerWithBuiltIns and R.MouseManagersWrapper.
@electronicwhisper: Please take a quick look at my approach here.
Basic account of changes:
Canvas
intoApparatusCanvas
, a more generic diagram-renderer which can be used for the editor, the create-panel thumbnails, and embeddings. I added a bunch of flags to turn on and off different features. I am a little worried about this getting messy, but I think it's important to have the code in one place. Changes to the canvas should always be made with some consideration given to these different rendering contexts.Model.SerializerWithBuiltIns
andR.MouseManagersWrapper
.(You can test the library by visiting http://localhost:8080/viewer-test/ after running
npm run start
.)