| author | ymh <ymh.work@gmail.com> |
| Fri, 16 May 2014 14:09:57 +0200 | |
| changeset 293 | fba23fde14ba |
| parent 284 | fa8035885814 |
| child 433 | e457ec945e50 |
| permissions | -rw-r--r-- |
| 284 | 1 |
|
2 |
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
|
3 |
'use strict'; |
|
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
4 |
|
| 284 | 5 |
var Utils = requtils.getUtils(); |
6 |
||
7 |
/* NodeShrinkButton Begin */ |
|
8 |
||
9 |
//var NodeShrinkButton = Renderer.NodeShrinkButton = Utils.inherit(Renderer._NodeButton); |
|
10 |
var NodeShrinkButton = Utils.inherit(NodeButton); |
|
11 |
||
12 |
_(NodeShrinkButton.prototype).extend({ |
|
13 |
_init: function() { |
|
14 |
this.type = "Node-shrink-button"; |
|
15 |
this.lastSectorInner = 0; |
|
16 |
this.startAngle = -180; |
|
17 |
this.endAngle = -135; |
|
18 |
this.imageName = "shrink"; |
|
19 |
this.text = "Shrink"; |
|
20 |
}, |
|
21 |
mouseup: function() { |
|
22 |
var _newsize = -1 + (this.source_representation.model.get("size") || 0); |
|
23 |
this.source_representation.model.set("size", _newsize); |
|
24 |
this.source_representation.select(); |
|
25 |
this.select(); |
|
26 |
paper.view.draw(); |
|
27 |
} |
|
28 |
}); |
|
29 |
||
30 |
/* NodeShrinkButton End */ |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
31 |
|
| 284 | 32 |
return NodeShrinkButton; |
33 |
||
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
34 |
}); |