<commit_before>/*
 * PersonGroup is node that represents a grouping of an unknown number of nodes ("n"). This type of
 * node is usually used to indicate the existence of relatives without providing any other information.
 * Therefore the options for this node are limited.
 *
 * @param x the x coordinate on the Raphael canvas at which the node drawing will be centered
 * @param the y coordinate on the Raphael canvas at which the node drawing will be centered
 * @param gender either 'M', 'F' or 'U' depending on the gender
 * @param id a unique ID number
 */

var PersonGroup = Class.create(AbstractPerson, {

    initialize: function($super, x, y, gender, id) {
        this._type = "PersonGroup";
        $super(x, y, gender, id);
    },

    /*
     * Initializes the object responsible for creating graphics for this PlaceHolder
     *
     * @param x the x coordinate on the canvas at which the node is centered
     * @param y the y coordinate on the canvas at which the node is centered
     */
    generateGraphics: function(x, y) {
        return new PersonGroupVisuals(this, x, y);
    },

    /*
     * Deletes this node, it's placeholder partners and children and optionally
     * removes all the other nodes that are unrelated to the proband node.
     *
     * @param isRecursive set to true if you want to remove related nodes that are
     * not connected to the proband
     */
    remove: function($super, isRecursive, skipConfirmation) {
        editor.getGraph().removePersonGroup(this);
        var parents = this.getParentPartnership();
        if(!isRecursive && parents && parents.getChildren().length == 1) {
            var placeholder = editor.getGraph().addPlaceHolder(this.getX(), this.getY(), "U", true);
            parents.removeChild(this);
            parents.addChild(placeholder);
        }
        return $super(isRecursive, skipConfirmation);
    }
});<commit_msg>Fixed remove for person Group<commit_after>/*
 * PersonGroup is node that represents a grouping of an unknown number of nodes ("n"). This type of
 * node is usually used to indicate the existence of relatives without providing any other information.
 * Therefore the options for this node are limited.
 *
 * @param x the x coordinate on the Raphael canvas at which the node drawing will be centered
 * @param the y coordinate on the Raphael canvas at which the node drawing will be centered
 * @param gender either 'M', 'F' or 'U' depending on the gender
 * @param id a unique ID number
 */

var PersonGroup = Class.create(AbstractPerson, {

    initialize: function($super, x, y, gender, id) {
        this._type = "PersonGroup";
        $super(x, y, gender, id);
    },

    /*
     * Initializes the object responsible for creating graphics for this PlaceHolder
     *
     * @param x the x coordinate on the canvas at which the node is centered
     * @param y the y coordinate on the canvas at which the node is centered
     */
    generateGraphics: function(x, y) {
        return new PersonGroupVisuals(this, x, y);
    },

    /*
     * Deletes this node, it's placeholder partners and children and optionally
     * removes all the other nodes that are unrelated to the proband node.
     *
     * @param isRecursive set to true if you want to remove related nodes that are
     * not connected to the proband
     */
    remove: function($super, isRecursive, skipConfirmation) {
        var parents = this.getParentPartnership();
        if(!isRecursive && parents && parents.getChildren().length == 1) {
            var placeholder = editor.getGraph().addPlaceHolder(this.getX(), this.getY(), "U");
            parents.removeChild(this);
            parents.addChild(placeholder);
        }
        return $super(isRecursive, skipConfirmation);
    }
});
{'fraction_non_alphanumeric': 0.08587331036310628, 'fraction_numerical': 0.0005300821627352239, 'mean_word_length': 2.9852164730728616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6196877', 'n_tokens_mistral': 988, 'n_tokens_neox': 963, 'n_words': 434}