fabricjs-viewport
fabricjs-viewport copied to clipboard
Border and corners are messed up when I added this plugin code
I added this plugin to help with panning around my fabric.js canvas but now the corners and borders around active objects are all messed up. It appears to be in the right place, but I have to click like 20px away from the actual object to activate it and interact with it. Any idea as to what is going on?
You need to call obj.setCoords() where the object is the object that your plugin interacts with.
if (canvas.getActiveGroup()) {
canvas.getActiveGroup().forEachObject(function(obj) {
obj.setCoords();
});
} else {
var obj = canvas.getActiveObject();
obj.setCoords();
}