
define(['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {
    'use strict';

    var Utils = requtils.getUtils();

    /* EdgeRevertButton Begin */

    //var EdgeRevertButton = Renderer.EdgeRevertButton = Utils.inherit(Renderer._BaseButton);
    var EdgeRevertButton = Utils.inherit(BaseButton);

    _(EdgeRevertButton.prototype).extend({
        _init: function() {
            this.type = "Edge-revert-button";
            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -135, 135, 1, "revert", this.renkan.translate("Cancel deletion"));
        },
        mouseup: function() {
            this.renderer.click_target = null;
            this.renderer.is_dragging = false;
            if (this.renderer.isEditable()) {
                this.source_representation.model.unset("delete_scheduled");
            }
        }
    });

    /* EdgeRevertButton End */

    return EdgeRevertButton;

});
