Skip to content

Commit

Permalink
fix(fabric.Image): Cache CropX and CropY cache properties (#6924)
Browse files Browse the repository at this point in the history
Co-authored-by: Riley Gowan <rgowan@shutterstock.com
  • Loading branch information
rileygowan authored Mar 10, 2021
1 parent 4b5577f commit 2eabc92
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shapes/image.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
*/
stateProperties: fabric.Object.prototype.stateProperties.concat('cropX', 'cropY'),

/**
* List of properties to consider when checking if cache needs refresh
* Those properties are checked by statefullCache ON ( or lazy mode if we want ) or from single
* calls to Object.set(key, value). If the key is in this list, the object is marked as dirty
* and refreshed at the next render
* @type Array
*/
cacheProperties: fabric.Object.prototype.cacheProperties.concat('cropX', 'cropY'),

/**
* key used to retrieve the texture representing this image
* @since 2.0.0
Expand Down

0 comments on commit 2eabc92

Please sign in to comment.