Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Rotate a node without TextBlock

$
0
0

@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: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles