| author | rougeronj |
| Thu, 24 Sep 2015 13:31:13 +0200 | |
| changeset 547 | 0ce3dcdf24f7 |
| parent 487 | 48be7ebb3187 |
| permissions | -rw-r--r-- |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
1 |
|
| 284 | 2 |
|
3 |
define(['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) { |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
4 |
'use strict'; |
| 433 | 5 |
|
| 284 | 6 |
var Utils = requtils.getUtils(); |
7 |
||
8 |
/* NodeEnlargeButton Begin */ |
|
9 |
||
10 |
//var NodeEnlargeButton = Renderer.NodeEnlargeButton = Utils.inherit(Renderer._NodeButton); |
|
11 |
var NodeEnlargeButton = Utils.inherit(NodeButton); |
|
12 |
||
13 |
_(NodeEnlargeButton.prototype).extend({ |
|
14 |
_init: function() { |
|
15 |
this.type = "Node-enlarge-button"; |
|
16 |
this.lastSectorInner = 0; |
|
|
487
48be7ebb3187
add hide_nodes option to allow or node the hiding behavior on nodes
rougeronj
parents:
453
diff
changeset
|
17 |
this.startAngle = this.options.hide_nodes ? -55 : -45; |
|
48be7ebb3187
add hide_nodes option to allow or node the hiding behavior on nodes
rougeronj
parents:
453
diff
changeset
|
18 |
this.endAngle = this.options.hide_nodes ? -10 : 0; |
| 284 | 19 |
this.imageName = "enlarge"; |
20 |
this.text = "Enlarge"; |
|
21 |
}, |
|
22 |
mouseup: function() { |
|
23 |
var _newsize = 1 + (this.source_representation.model.get("size") || 0); |
|
24 |
this.source_representation.model.set("size", _newsize); |
|
25 |
this.source_representation.select(); |
|
26 |
this.select(); |
|
27 |
paper.view.draw(); |
|
28 |
} |
|
| 433 | 29 |
}).value(); |
|
434
0d5998b32a7c
clean, and finalize lodash migration
ymh <ymh.work@gmail.com>
parents:
433
diff
changeset
|
30 |
|
| 284 | 31 |
/* NodeEnlargeButton End */ |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
32 |
|
| 284 | 33 |
return NodeEnlargeButton; |
34 |
||
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
35 |
}); |