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

Send to back - Gojs

$
0
0

@ramesh1 wrote:

Hi,
I am trying to implement send to back and bring to front functionality. While the below code works fine for bring to front, but has some issues with send to back. For instance i have 2 shapes, and i give go to back command for the top shape and it goes back without any issue. Now the new object which is in front doesnt respond to go to back. Kindly guide me.

function makeContextMenu(wiDiagram)
{
var $ = go.GraphObject.make
return $(go.Adornment, "Vertical",
$("ContextMenuButton",
$(go.TextBlock, "Bring to front"),
{
click: function (e, obj)
{

                obj.part.adornedPart.layerName = "";
                obj.part.adornedPart.layerName = "Foreground";


            }
        }
    ),
    $("ContextMenuButton",
        $(go.TextBlock, "Send to Back"),
        {
            click: function (e, obj) {


                obj.part.adornedPart.layerName = "";
                obj.part.adornedPart.layerName = "Background";


            }
        }
    )

);
}

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6977

Latest Images

Trending Articles



Latest Images