I’m working on my drawing bar, at first I thought about controlling it with my own functions but then I thought why not use the plotly functions better I guess if there is a button in the modebar to delete shapes then there must be a function to do it and instead to make mine because I use that and possibly other functions; I found the function but I don’t know how to import it, I still don’t understand this module thing very well, this is the line of code I added to try to use it which I saw in another plotly file but when I try to use it I get this error: “eraseActiveShape is not a function”
var eraseActiveShape = require('../node_modules/plotly.js/src/components/shapes/draw').eraseActiveShape;
I am using modules from other libraries which I import in the same way using require and I have no problems with those, I guess I am omitting something to be able to use the plotly modules, by the way I am using electron with node