Question

I got another problem with my tooltips(Old Question)

LINK: M13 Playground

When the user deletes the layer in my Fabric.js canvas and reset the variable activeObject

canvas.remove(activeObject);
activeObject = null;

The .tooltip should show up again but the log file says it is not resettet

So my question is:

How do I really kill the activeObject() in fabric to archieve what I want?

Was it helpful?

Solution

This is a bug - i think if we remove object from canvas we should remove activeObject as well. I will open a issue on github.

But for now you can do this:

canvas.discardActiveObject();
canvas.remove(activeObject);

Here is the issue on github: https://github.com/kangax/fabric.js/issues/962

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top