client/js/renderer/nodeeditbutton.js
author rougeronj
Tue, 16 Jun 2015 11:37:20 +0200
changeset 483 9bb08a2c2449
parent 453 04b7d46e9d67
child 487 48be7ebb3187
permissions -rw-r--r--
New nodeeditor html for video node type and update css to make the video fit the popup


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

    var Utils = requtils.getUtils();

    /* NodeEditButton Begin */

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

    _(NodeEditButton.prototype).extend({
        _init: function() {
            this.type = "Node-edit-button";
            this.lastSectorInner = 0;
            this.startAngle = -125;
            this.endAngle = -55;
            this.imageName = "edit";
            this.text = "Edit";
        },
        mouseup: function() {
            if (!this.renderer.is_dragging) {
                this.source_representation.openEditor();
            }
        }
    }).value();

    /* NodeEditButton End */

    return NodeEditButton;

});