Fabric.js – how to save canvas on server with custom attributes

Good question. If you’re adding custom properties to objects, those objects are likely “special” in some way. It seems like subclassing them would be a reasonable solution. For example, here’s how we would subclass a fabric.Image into a named image. Those image objects could then have names like “Gandalf” or “Samwise”. fabric.NamedImage = fabric.util.createClass(fabric.Image, { … Read more