pcm-shared-components 2.0.155 → 2.0.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,41 +84,19 @@ export const ImageCanvasDraw = props => {
|
|
|
84
84
|
console.error('error in setImageSize', error);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
|
|
88
|
-
// useEffect(() => {
|
|
89
|
-
// //Get the scaled down image and width, height
|
|
90
|
-
// setImageSize(state.b64DataUrl)
|
|
91
|
-
|
|
92
|
-
// try {
|
|
93
|
-
// document.addEventListener('keydown', function (e) {
|
|
94
|
-
// console.log('debug e',e)
|
|
95
|
-
// if (e.ctrlKey && e.key.toLowerCase() === 'z') {
|
|
96
|
-
// saveableCanvas.current.undo();
|
|
97
|
-
// }
|
|
98
|
-
// });
|
|
99
|
-
|
|
100
|
-
// } catch (error) {
|
|
101
|
-
// console.error('Error in keydown ImageCanvasDraw Controls',error)
|
|
102
|
-
// }
|
|
103
|
-
|
|
104
|
-
// }, [])
|
|
105
|
-
|
|
106
87
|
useEffect(() => {
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return () => {
|
|
120
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
121
|
-
};
|
|
88
|
+
//Get the scaled down image and width, height
|
|
89
|
+
setImageSize(state.b64DataUrl);
|
|
90
|
+
try {
|
|
91
|
+
document.addEventListener('keydown', function (e) {
|
|
92
|
+
console.log('debug e', e);
|
|
93
|
+
if (e.ctrlKey && e.key.toLowerCase() === 'z') {
|
|
94
|
+
saveableCanvas.current.undo();
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error('Error in keydown ImageCanvasDraw Controls', error);
|
|
99
|
+
}
|
|
122
100
|
}, []);
|
|
123
101
|
useEffect(() => {
|
|
124
102
|
if (saveableCanvas && saveableCanvas.current) {
|