Skip to content

Commit de28391

Browse files
authored
Merge pull request #74 from mahbubsabuj/bug/multiple-selected-item-not-remove-fix
fix: removing multiple item by selecting not working issue
2 parents eba72f0 + 04ce27e commit de28391

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

projects/angular-editor-fabric-js/src/lib/angular-editor-fabric-js.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,14 @@ export class FabricjsEditorComponent implements AfterViewInit {
505505
const activeObject = this.canvas.getActiveObject();
506506
const activeGroup = this.canvas.getActiveObjects();
507507

508-
if (activeObject) {
509-
this.canvas.remove(activeObject);
510-
// this.textString = '';
511-
} else if (activeGroup) {
508+
if (activeGroup) {
512509
this.canvas.discardActiveObject();
513510
const self = this;
514511
activeGroup.forEach((object) => {
515512
self.canvas.remove(object);
516513
});
514+
} else if (activeObject) {
515+
this.canvas.remove(activeObject);
517516
}
518517
}
519518

0 commit comments

Comments
 (0)