We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 246a60f commit ebe2ff7Copy full SHA for ebe2ff7
src/SketchField.jsx
@@ -462,6 +462,12 @@ class SketchField extends PureComponent {
462
return !!canvas.getActiveObject();
463
}
464
465
+ clearSelection = () => {
466
+ let canvas = this._fc;
467
+ canvas.discardActiveObject();
468
+ canvas.requestRenderAll();
469
+ }
470
+
471
/**
472
* Remove selected object from the canvas
473
*/
types/index.d.ts
@@ -155,7 +155,8 @@ declare module 'react-sketch' {
155
clear(propertiesToInclude?: ArrayLike<string>): string
156
157
hasSelection(): boolean
158
-
+ clearSelection(): void
159
160
161
162
0 commit comments