| author | rougeronj |
| Thu, 24 Sep 2015 13:31:13 +0200 | |
| changeset 547 | 0ce3dcdf24f7 |
| parent 507 | fe71fdbc6663 |
| permissions | -rw-r--r-- |
| 449 | 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; |
|
| 453 | 16 |
this.startAngle = 45; |
17 |
this.endAngle = 90; |
|
| 449 | 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()) { |
|
|
507
fe71fdbc6663
change this.render to this.render.view which handle the representation of the view
rougeronj
parents:
453
diff
changeset
|
26 |
this.renderer.view.addHiddenNode(this.source_representation.model); |
| 449 | 27 |
} |
28 |
} |
|
29 |
}).value(); |
|
30 |
||
31 |
/* NodeRemoveButton End */ |
|
32 |
||
33 |
return NodeHideButton; |
|
34 |
||
35 |
}); |