Show dimension to dragged object in floor planner

Is it possible to show the dimensions to the dragged objects in “Floorplanner” as of in “DimensioningLink”…if yes can u please send me some examples for the same…?

That is certainly possible, but it would be very easy to implement a selection Adornment that just shows the “width” and “height” as text positioned along the sides of the node. If you want, I can show you an example.

It would be great help if u can show me some examples for the same…thanks for your quick response.

Assuming your node template has a TwoWay Binding on a Shape named “SHAPE” to its GraphObject.desiredSize property from the data property named “size”, and assuming that Shape is also the object named by Part.resizeObjectName:

        {
          selectionAdornmentTemplate:
            $(go.Adornment, "Spot",
              $(go.Panel, "Auto",
                $(go.Shape, { stroke: "dodgerblue", strokeWidth: 2, fill: null }),
                $(go.Placeholder, { margin: 2 })
              ),
              // Assume the SHAPE's desiredSize is stored in data.size as a string by the TwoWay Binding on SHAPE
              $(go.TextBlock, { stroke: "dodgerblue", alignment: go.Spot.Top, alignmentFocus: new go.Spot(0, 1, 3, 0) },
                new go.Binding("text", "size", function(s) { return s.split(" ")[1]; })),
              $(go.TextBlock, { stroke: "dodgerblue", alignment: go.Spot.Left, alignmentFocus: new go.Spot(1, 0, 0, 3) },
                new go.Binding("text", "size", function(s) { return s.split(" ")[0]; }))
            )
        }

Here I’ve purposely offset the two dodgerblue TextBlocks not to be centered on the sides of the node, to avoid any links connecting at those side centers. Of course you can position those labels where you want relative to the Placeholder.

Note that until there is a value for data.size, those two selection labels won’t show anything.

You might want to convert the value to make sure the numbers shown are integral, or have values that are appropriate for the coordinate system that the user expects.

Hi Walter,
Sorry for the late reply…i just want to say that am very new to GoJS…i just started to understand the things…it would be great if u can tell me where(file/function) should i use the above code for the thing to work.
Thanks in advance.

On your node template(s).