@jalendra wrote:
Hi,
I have implemented the context menu as attached
. Now I am trying to add the shadow to the outerbox but whenever I add the shaddow to it it looks like
![]()
Code attached below
({ contextMenu: $(go.Adornment, "Vertical", { background: "#fff", width: 200, shadowOffset: new go.Point(1, 0) }, $(go.Panel, "Horizontal", _.extend({}, nodeContextMenuItemOptions.all, { name: nodeContextMenuItemOptions.all.name + "-copy", click: copyNodeToClipBoard, margin: new go.Margin(5, 0, 0, 0) }), $(go.TextBlock, _.extend({}, nodeContextMenuItemIconOptions.all, { text: "\uf0c5", stroke: nodeContextMenuItemIconOptions["default"].stroke })), $(go.TextBlock, "Copy", _.extend({}, nodeContextMenuItemTextOptions.all, { stroke: nodeContextMenuItemTextOptions["default"].stroke }))), $(go.Panel, "Horizontal", _.extend({}, nodeContextMenuItemOptions.all, { name: nodeContextMenuItemOptions.all.name + "-paste", click: function(e, d) { if (isActionEnabled("paste", e, d)) { return pasteToNode(d.part.data.key); } } }), $(go.TextBlock, _.extend({}, nodeContextMenuItemIconOptions.all, { text: "\uf0ea" }), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("paste", e, d)) { return nodeContextMenuItemIconOptions["default"].stroke; } else { return nodeContextMenuItemIconOptions.disabled.stroke; } })), $(go.TextBlock, "Paste", _.extend({}, nodeContextMenuItemTextOptions.all, {}), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("paste", e, d)) { return nodeContextMenuItemTextOptions["default"].stroke; } else { return nodeContextMenuItemTextOptions.disabled.stroke; } }))), $(go.Shape, "LineH", { stroke: "#e4e4e4", fill: "transparent", margin: new go.Margin(5, 0, 5, 0), width: 200, height: 1 }), $(go.Panel, "Horizontal", _.extend({}, nodeContextMenuItemOptions.all, { name: nodeContextMenuItemOptions.all.name + "-moveLeft", click: function(e, d) { if (isActionEnabled("moveLeft", e, d)) { return moveNode("left", e, d); } } }), $(go.TextBlock, _.extend({}, nodeContextMenuItemIconOptions.all, { text: "\uf177" }), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("moveLeft", e, d)) { return nodeContextMenuItemIconOptions["default"].stroke; } else { return nodeContextMenuItemIconOptions.disabled.stroke; } })), $(go.TextBlock, "Move Left", _.extend({}, nodeContextMenuItemTextOptions.all, {}), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("moveLeft", e, d)) { return nodeContextMenuItemTextOptions["default"].stroke; } else { return nodeContextMenuItemTextOptions.disabled.stroke; } }))), $(go.Panel, "Horizontal", _.extend({}, nodeContextMenuItemOptions.all, { name: nodeContextMenuItemOptions.all.name + "-moveRight", click: function(e, d) { if (!scope.readOnly && editable() && showMoveRight(e, d)) { return moveNode("right", e, d); } } }), $(go.TextBlock, _.extend({}, nodeContextMenuItemIconOptions.all, { text: "\uf178" }), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("moveRight", e, d)) { return nodeContextMenuItemIconOptions["default"].stroke; } else { return nodeContextMenuItemIconOptions.disabled.stroke; } })), $(go.TextBlock, "Move Right", _.extend({}, nodeContextMenuItemTextOptions.all, {}), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("moveRight", e, d)) { return nodeContextMenuItemTextOptions["default"].stroke; } else { return nodeContextMenuItemTextOptions.disabled.stroke; } }))), $(go.Shape, "LineH", { stroke: "#e4e4e4", fill: "transparent", margin: new go.Margin(5, 0, 5, 0), width: 200, height: 1 }), $(go.Panel, "Horizontal", _.extend({}, nodeContextMenuItemOptions.all, { name: nodeContextMenuItemOptions.all.name + "-delete", margin: new go.Margin(0, 0, 5, 0), click: function(e, d) { if (isActionEnabled("delete", e, d)) { return DeleteNode(e, d); } } }), $(go.TextBlock, _.extend({}, nodeContextMenuItemIconOptions.all, { text: "\uf1f8" }), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("delete", e, d)) { return nodeContextMenuItemIconOptions["default"].stroke; } else { return nodeContextMenuItemIconOptions.disabled.stroke; } })), $(go.TextBlock, "Delete", _.extend({}, nodeContextMenuItemTextOptions.all, {}), new go.Binding("stroke", '', function(e, d) { if (isActionEnabled("delete", e, d)) { return nodeContextMenuItemTextOptions["default"].stroke; } else { return nodeContextMenuItemTextOptions.disabled.stroke; } })))) });
Posts: 1
Participants: 1