@biswa wrote:
How to rorate a node without TextBlock?
Using contextMenu?MY code is
{contextMenu :
$(go.Adornment, “Vertical”,
$(“ContextMenuButton”,
$(go.TextBlock, “Edit”, { margin: 3 }),
{ click: function(e, obj) {
var node = obj.part.adornedPart;
e.diagram.commandHandler.editTextBlock(node.findObject(“TEXTBLOCK”)); } }),
$(“ContextMenuButton”,
$(go.TextBlock, “Rotate +45”, { margin: 3 }),
{ click: function(e, obj) { myDiagram.commandHandler.rotate(45); } }),
$(“ContextMenuButton”,
$(go.TextBlock, “Rotate -45”, { margin: 3 }),
{ click: function(e, obj) { myDiagram.commandHandler.rotate(-45); } }),
$(“ContextMenuButton”,
$(go.TextBlock, “Rotate +90”, { margin: 3 }),
{ click: function(e, obj) { myDiagram.commandHandler.rotate(90); } }),
$(“ContextMenuButton”,
$(go.TextBlock, “Rotate -90”, { margin: 3 }),
{ click: function(e, obj) { myDiagram.commandHandler.rotate(-90); } }),
$(“ContextMenuButton”,
$(go.TextBlock, “Rotate 180”, { margin: 3 }),
{ click: function(e, obj) { myDiagram.commandHandler.rotate(180); } })
)},
Posts: 3
Participants: 2