| author | ymh <ymh.work@gmail.com> |
| Thu, 05 Jun 2014 10:48:28 +0200 | |
| changeset 302 | 8eeb52f093e1 |
| parent 293 | fba23fde14ba |
| child 396 | b51c25ef4292 |
| permissions | -rw-r--r-- |
| 284 | 1 |
|
2 |
define(['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) { |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
3 |
'use strict'; |
| 284 | 4 |
|
5 |
var Utils = requtils.getUtils(); |
|
6 |
||
7 |
/* _NodeButton Begin */ |
|
8 |
||
9 |
//var _NodeButton = Renderer._NodeButton = Utils.inherit(Renderer._BaseButton); |
|
10 |
var _NodeButton = Utils.inherit(BaseButton); |
|
11 |
||
12 |
_(_NodeButton.prototype).extend({ |
|
13 |
setSectorSize: function() { |
|
14 |
var sectorInner = this.source_representation.circle_radius; |
|
15 |
if (sectorInner !== this.lastSectorInner) { |
|
16 |
if (this.sector) { |
|
17 |
this.sector.destroy(); |
|
18 |
} |
|
19 |
this.sector = this.renderer.drawSector( |
|
20 |
this, 1 + sectorInner, |
|
21 |
Utils._NODE_BUTTON_WIDTH + sectorInner, |
|
22 |
this.startAngle, |
|
23 |
this.endAngle, |
|
24 |
1, |
|
25 |
this.imageName, |
|
26 |
this.renkan.translate(this.text) |
|
27 |
); |
|
28 |
this.lastSectorInner = sectorInner; |
|
29 |
} |
|
30 |
} |
|
31 |
}); |
|
32 |
||
33 |
/* _NodeButton End */ |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
34 |
|
| 284 | 35 |
return _NodeButton; |
36 |
||
37 |
}); |