react-fabric-canvas-designer
Version:
A React-based wrapper for Fabric.js to create interactive and customizable canvas-based designs. This library provides tools for drawing, editing, and managing objects on a canvas with React-friendly APIs.
25 lines (24 loc) • 719 B
JavaScript
import { bindThisInAllObjFn } from "../helpers/helpers";
import { WrapperFabric } from "./WrapperFabric";
export class FabricImageObj extends WrapperFabric {
constructor(rectObj) {
super(rectObj);
Object.defineProperty(this, "obj", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.propertyListMap = { ...this.propertyListMap, "imageFit": this.setImageFit };
this.obj = rectObj;
bindThisInAllObjFn(this, this.propertyListMap);
}
setImageFit(_) {
}
getObjectValues() {
return {
...super.getObjectValues(),
// imageFit: null
};
}
}