# Fabric.js

Place the `fabric.min.js` file from Fabric.js 7.x in this folder.

**Current supported version:** 7.1.0

## Download

1. Go to https://fabricjs.com/ or https://github.com/fabricjs/fabric.js/releases
2. Download the latest 7.x release
3. Copy `dist/fabric.min.js` to this folder

## Or use npm

```bash
npm install fabric@7.1.0
# Then copy node_modules/fabric/dist/fabric.min.js here
```

## File structure should be:
```
assets/vendor/fabricjs/
├── fabric.min.js   <-- Required
└── README.md
```

## Breaking Changes in Fabric.js 7.x

The plugin has been updated to handle these breaking changes:

1. **Default origin changed to center/center** - We explicitly set `originX: 'left'` and `originY: 'top'` for mask shapes to maintain coordinate compatibility with the admin preview.

2. **Text positioning fixes** - Text is positioned using `originX: 'center'` and `originY: 'center'` explicitly.

See: https://github.com/fabricjs/fabric.js/releases/tag/v700
