| author | ymh <ymh.work@gmail.com> |
| Sat, 25 Apr 2015 04:37:06 +0200 | |
| changeset 434 | 0d5998b32a7c |
| parent 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 |
/* NodeRevertButton Begin */ |
|
8 |
||
9 |
//var NodeRevertButton = Renderer.NodeRevertButton = Utils.inherit(Renderer._NodeButton); |
|
10 |
var NodeRevertButton = Utils.inherit(NodeButton); |
|
11 |
||
12 |
_(NodeRevertButton.prototype).extend({ |
|
13 |
_init: function() { |
|
14 |
this.type = "Node-revert-button"; |
|
15 |
this.lastSectorInner = 0; |
|
16 |
this.startAngle = -135; |
|
17 |
this.endAngle = 135; |
|
18 |
this.imageName = "revert"; |
|
19 |
this.text = "Cancel deletion"; |
|
20 |
}, |
|
21 |
mouseup: function() { |
|
22 |
this.renderer.click_target = null; |
|
23 |
this.renderer.is_dragging = false; |
|
24 |
if (this.renderer.isEditable()) { |
|
25 |
this.source_representation.model.unset("delete_scheduled"); |
|
26 |
} |
|
27 |
} |
|
| 433 | 28 |
}).value(); |
|
434
0d5998b32a7c
clean, and finalize lodash migration
ymh <ymh.work@gmail.com>
parents:
433
diff
changeset
|
29 |
|
| 284 | 30 |
/* NodeRevertButton End */ |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
284
diff
changeset
|
31 |
|
| 284 | 32 |
return NodeRevertButton; |
33 |
||
34 |
}); |