equal
deleted
inserted
replaced
|
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 NodeHideButton = Utils.inherit(NodeButton); |
|
11 |
|
12 _(NodeHideButton.prototype).extend({ |
|
13 _init: function() { |
|
14 this.type = "Node-hide-button"; |
|
15 this.lastSectorInner = 0; |
|
16 this.startAngle = 60; |
|
17 this.endAngle = 120; |
|
18 this.imageName = "hide"; |
|
19 this.text = "Hide"; |
|
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.renderer.addHiddenNode(this.source_representation.model); |
|
27 } |
|
28 } |
|
29 }).value(); |
|
30 |
|
31 /* NodeRemoveButton End */ |
|
32 |
|
33 return NodeHideButton; |
|
34 |
|
35 }); |