equal
deleted
inserted
replaced
|
1 "use strict"; |
|
2 |
|
3 define(['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) { |
|
4 |
|
5 var Utils = requtils.getUtils(); |
|
6 |
|
7 /* NodeEditButton Begin */ |
|
8 |
|
9 //var NodeEditButton = Renderer.NodeEditButton = Utils.inherit(Renderer._NodeButton); |
|
10 var NodeEditButton = Utils.inherit(NodeButton); |
|
11 |
|
12 _(NodeEditButton.prototype).extend({ |
|
13 _init: function() { |
|
14 this.type = "Node-edit-button"; |
|
15 this.lastSectorInner = 0; |
|
16 this.startAngle = -135; |
|
17 this.endAngle = -45; |
|
18 this.imageName = "edit"; |
|
19 this.text = "Edit"; |
|
20 }, |
|
21 mouseup: function() { |
|
22 if (!this.renderer.is_dragging) { |
|
23 this.source_representation.openEditor(); |
|
24 } |
|
25 } |
|
26 }); |
|
27 |
|
28 /* NodeEditButton End */ |
|
29 |
|
30 return NodeEditButton; |
|
31 |
|
32 }); |