|
453
|
1 |
|
|
|
2 |
define(['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) { |
|
|
3 |
'use strict'; |
|
|
4 |
|
|
|
5 |
var Utils = requtils.getUtils(); |
|
|
6 |
|
|
|
7 |
/* NodeRemoveButton Begin */ |
|
|
8 |
|
|
|
9 |
//var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton); |
|
|
10 |
var NodeShowButton = Utils.inherit(NodeButton); |
|
|
11 |
|
|
|
12 |
_(NodeShowButton.prototype).extend({ |
|
|
13 |
_init: function() { |
|
|
14 |
this.type = "Node-show-button"; |
|
|
15 |
this.lastSectorInner = 0; |
|
|
16 |
this.startAngle = 90; |
|
|
17 |
this.endAngle = 135; |
|
|
18 |
this.imageName = "show"; |
|
553
|
19 |
this.text = "Show neighbors"; |
|
453
|
20 |
}, |
|
|
21 |
mouseup: function() { |
|
|
22 |
this.renderer.click_target = null; |
|
|
23 |
this.renderer.is_dragging = false; |
|
|
24 |
this.renderer.removeRepresentationsOfType("editor"); |
|
|
25 |
if (this.renderer.isEditable()) { |
|
|
26 |
this.source_representation.showNeighbors(false); |
|
|
27 |
} |
|
|
28 |
} |
|
|
29 |
}).value(); |
|
|
30 |
|
|
|
31 |
/* NodeShowButton End */ |
|
|
32 |
|
|
|
33 |
return NodeShowButton; |
|
|
34 |
|
|
|
35 |
}); |