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.
2 parents eba72f0 + 04ce27e commit de28391Copy full SHA for de28391
projects/angular-editor-fabric-js/src/lib/angular-editor-fabric-js.component.ts
@@ -505,15 +505,14 @@ export class FabricjsEditorComponent implements AfterViewInit {
505
const activeObject = this.canvas.getActiveObject();
506
const activeGroup = this.canvas.getActiveObjects();
507
508
- if (activeObject) {
509
- this.canvas.remove(activeObject);
510
- // this.textString = '';
511
- } else if (activeGroup) {
+ if (activeGroup) {
512
this.canvas.discardActiveObject();
513
const self = this;
514
activeGroup.forEach((object) => {
515
self.canvas.remove(object);
516
});
+ } else if (activeObject) {
+ this.canvas.remove(activeObject);
517
}
518
519
0 commit comments