commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
diff --git a/node_modules/@radix-ui/react-use-callback-ref/dist/index.js b/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
||||
index 1a31eaf..79315a4 100644
|
||||
--- a/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
||||
+++ b/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
||||
@@ -9,16 +9,18 @@ $parcel$export(module.exports, "useCallbackRef", () => $28e03942f763e819$export$
|
||||
/**
|
||||
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
||||
* prop or avoid re-executing effects when passed as a dependency
|
||||
- */ function $28e03942f763e819$export$25bec8c6f54ee79a(callback) {
|
||||
- const callbackRef = $92muK$react.useRef(callback);
|
||||
- $92muK$react.useEffect(()=>{
|
||||
- callbackRef.current = callback;
|
||||
- }); // https://github.com/facebook/react/issues/19240
|
||||
- return $92muK$react.useMemo(()=>(...args)=>{
|
||||
- var _callbackRef$current;
|
||||
- return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
||||
- }
|
||||
- , []);
|
||||
+ */
|
||||
+function $28e03942f763e819$export$25bec8c6f54ee79a(callback) {
|
||||
+ const callbackRef = $92muK$react.useRef(callback);
|
||||
+ $92muK$react.useEffect(() => {
|
||||
+ callbackRef.current = callback;
|
||||
+ }); // https://github.com/facebook/react/issues/19240
|
||||
+ return $92muK$react.useMemo(() => (...args) => {
|
||||
+ var _callbackRef$current;
|
||||
+ if (typeof (_callbackRef$current = callbackRef.current) === 'function') {
|
||||
+ return _callbackRef$current.call(callbackRef, ...args);
|
||||
+ }
|
||||
+ }, []);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs b/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
index 451f620..3a98d1f 100644
|
||||
--- a/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
+++ b/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
@@ -11,7 +11,9 @@ import {useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiW
|
||||
}); // https://github.com/facebook/react/issues/19240
|
||||
return $lwiWj$useMemo(()=>(...args)=>{
|
||||
var _callbackRef$current;
|
||||
+ if (typeof (_callbackRef$current = callbackRef.current) === 'function') {
|
||||
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
||||
+ }
|
||||
}
|
||||
, []);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
diff --git a/node_modules/fabric/dist/fabric.js b/node_modules/fabric/dist/fabric.js
|
||||
index faee7fc..02e5ae3 100644
|
||||
--- a/node_modules/fabric/dist/fabric.js
|
||||
+++ b/node_modules/fabric/dist/fabric.js
|
||||
@@ -12591,7 +12591,7 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, /** @lends fab
|
||||
this.cacheCanvasEl = this._createCanvasElement();
|
||||
this.cacheCanvasEl.setAttribute('width', this.width);
|
||||
this.cacheCanvasEl.setAttribute('height', this.height);
|
||||
- this.contextCache = this.cacheCanvasEl.getContext('2d');
|
||||
+ this.contextCache = this.cacheCanvasEl.getContext('2d', {willReadFrequently: true});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -15103,7 +15103,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
|
||||
_createCacheCanvas: function() {
|
||||
this._cacheProperties = {};
|
||||
this._cacheCanvas = fabric.util.createCanvasElement();
|
||||
- this._cacheContext = this._cacheCanvas.getContext('2d');
|
||||
+ this._cacheContext = this._cacheCanvas.getContext('2d', {willReadFrequently: true});
|
||||
this._updateCacheCanvas();
|
||||
// if canvas gets created, is empty, so dirty.
|
||||
this.dirty = true;
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user