File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
projects/angular-editor-fabric-js/src/lib Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -502,10 +502,10 @@ export class FabricjsEditorComponent implements AfterViewInit {
502502
503503
504504 removeSelected ( ) {
505- const activeObject = this . canvas . getActiveObject ( ) ;
506- const activeGroup = this . canvas . getActiveObjects ( ) ;
505+ const activeObject : any = this . canvas . getActiveObject ( ) ;
506+ const activeGroup : any = this . canvas . getActiveObjects ( ) ;
507507
508- if ( activeObject ) {
508+ if ( activeObject && ! activeObject . _objects ) {
509509 this . canvas . remove ( activeObject ) ;
510510 // this.textString = '';
511511 } else if ( activeGroup ) {
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ <h4>Github: <a href="https://github.com/saqib92/angular-editor-fabric-js">angula
146146 < div class ="card-header "> Options</ div >
147147 < div class ="card-body text-center ">
148148 < div class ="btn-group " role ="group " aria-label ="... ">
149- < button data-toggle ="tooltip " data-placement ="bottom " title ="Delete element " type ="button " class ="btn btn-outline-danger " [disabled] =" !canvas.selected "
149+ < button data-toggle ="tooltip " data-placement ="bottom " title ="Delete element " type ="button " class ="btn btn-outline-danger "
150150 (click) ="removeSelected(); ">
151151 < i class ="fa fa-trash " aria-hidden ="true "> </ i >
152152 </ button >
You can’t perform that action at this time.
0 commit comments