client/js/renderer/nodeenlargebutton.js
author durandn
Tue, 04 Oct 2016 16:35:37 +0200
changeset 642 91f4bdfa032e
parent 487 48be7ebb3187
permissions -rw-r--r--
Added tag V00.12.23 for changeset 30b673cb13ee



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

    var Utils = requtils.getUtils();

    /* NodeEnlargeButton Begin */

    //var NodeEnlargeButton = Renderer.NodeEnlargeButton = Utils.inherit(Renderer._NodeButton);
    var NodeEnlargeButton = Utils.inherit(NodeButton);

    _(NodeEnlargeButton.prototype).extend({
        _init: function() {
            this.type = "Node-enlarge-button";
            this.lastSectorInner = 0;
            this.startAngle = this.options.hide_nodes ? -55 : -45;
            this.endAngle = this.options.hide_nodes ? -10 : 0;
            this.imageName = "enlarge";
            this.text = "Enlarge";
        },
        mouseup: function() {
            var _newsize = 1 + (this.source_representation.model.get("size") || 0);
            this.source_representation.model.set("size", _newsize);
            this.source_representation.select();
            this.select();
            paper.view.draw();
        }
    }).value();

    /* NodeEnlargeButton End */

    return NodeEnlargeButton;

});