Cursor not updating when hovering on Shape

I have an issue with my resizeAdornmentTemplate. I’m overriding it in order to only provide resize handles on the right and left center of my node:

template.resizeAdornmentTemplate = this.$go(go.Adornment, "Spot",
            this.$go(go.Placeholder),
            this.$go(go.Shape, 
                {
                    figure: 'Rectangle',
                    alignment: go.Spot.Left,
                    alignmentFocus: go.Spot.Center,
                    width: 10,
                    fill: "lightblue",
                    stroke: "dodgerblue",
                    cursor: "col-resize"
                },
                new go.Binding('height', 'height', (height: number) => (height / 2) - this.config.overlapH-1),
                new go.Binding('width', 'height', (height: number) => (height / 2) - this.config.overlapH-1)
            ),
            this.$go(go.Shape,
                {
                    figure: 'Rectangle',
                    alignment: go.Spot.Right,
                    alignmentFocus: go.Spot.Center,
                    width: 10,
                    fill: "lightblue",
                    stroke: "dodgerblue",
                    cursor: "col-resize"
                },
                new go.Binding('height', 'height', (height: number) => (height / 2) - this.config.overlapH-1),
                new go.Binding('width', 'height', (height: number) => (height / 2) - this.config.overlapH-1)
            )
        );

As you can see, I set the cursor to col-resize for both shapes and would expect it to change when I hover over the resize handles, however, the cursor never changes.

image
(Obviously you cannot see the cursor in this screenshot, but you can see the resize handles)

Am I doing something incorrectly?

Thanks!

The ResizingTool automatically sets the cursor on all of the handles, because it needs to change them as the node is rotated.

If you don’t need to rotate your nodes, it might be easiest to just disable that behavior by overriding the undocumented ResizingTool.updateResizeHandles method to be a no-op: function() {}

Is the updateResizeHandles called on hover, prior to left-click?

It gets called by ResizingTool.updateAdornments, which gets called often.

I tried it - I now get the correct cursor when releasing the mouse button after a resize, but still not on hover before resizing.

I just tried your resizeAdornmentTemplate along with this override:

      $(go.Diagram, . . .,
          { . . .,
            "resizingTool.updateResizeHandles": function() {},

And I believe it is showing the correct cursor before the user starts resizing in four different browsers.

So, a bit more information.

We have a custom resizing tool GanttResizingTool extends go.ResizingTool. The GanttResizingTool does not implement updateResizeHandles
image

When initializing our diagram, I made the following modifications when assigning this tool to the toolManager with no success.

image

Should I be doing something different? The GanttResizingTool is in a different project so I don’t have direct control over it.

Precisely which version of GoJS are you using? I think you can override updateResizeHandles in any version 1.6+.

We’re using GoJS v1.8.27

Well, I can’t explain it, because ResizingTool.updateAdornments definitely calls ResizingTool.updateResizeHandles whenever there is a “Resizing” Adornment, whether newly created or already existing.