function removeWithCallback()

in entity-browser-frontend/app/directive/linked-entities-view.js [43:55]


                function removeWithCallback(linkedEntity) {
                    if (scope.isEditMode) {
                        var found = scope.linkedEntities.find(function (entity) {
                            return entity.id === linkedEntity.id;
                        });
                        if (found) {
                            found.isDeleted = !found.isDeleted;
                            if (scope.onRemove()) {
                                scope.onRemove()(linkedEntity, found.isDeleted);
                            }
                        }
                    }
                }