<commit_before>'use strict';

Snap.plugin(function(Snap, Element) {
    /**
     * Rotates a given Snap.Element the given amount of degrees. The amount of
     * degrees can be a negative or positive number, depending on which way you
     * want to rotate the node. The rotation will be done around the central
     * coordinates of the element.
     *
     * @method rotate
     * @public
     * @param {Integer} degrees
     */
    Element.prototype.rotate = function(degrees) {
        var bbox = this.getBBox();

        var matrix = new Snap.Matrix();
        matrix.rotate(degrees, bbox.cx, bbox.cy);
        matrix.add(this.transform().localMatrix);

        this.transform(matrix);
    };
});<commit_msg>Emit an event when rotation is done.<commit_after>Snap.plugin(function(Snap, Element) {
    'use strict';

    /**
     * Rotates a given Snap.Element the given amount of degrees. The amount of
     * degrees can be a negative or positive number, depending on which way you
     * want to rotate the node. The rotation will be done around the central
     * coordinates of the element.
     *
     * @method rotate
     * @public
     * @param {Integer} degrees
     */
    Element.prototype.rotate = function(degrees) {
        var bbox = this.getBBox();

        var matrix = new Snap.Matrix();
        matrix.rotate(degrees, bbox.cx, bbox.cy);
        matrix.add(this.transform().localMatrix);

        this.transform(matrix);

        eve('snap.rotated.' + this.id, this);
    };
});
{'fraction_non_alphanumeric': 0.10866666666666666, 'fraction_numerical': 0.0, 'mean_word_length': 2.5070093457943927, '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': '4695447', 'n_tokens_mistral': 433, 'n_tokens_neox': 418, 'n_words': 141}