I want to make the resize adornment visible all the time so user can resize the node without selecting the node.
Is there a way to make resize adornments always visible?
I want to make the resize adornment visible all the time so user can resize the node without selecting the node.
Is there a way to make resize adornments always visible?
You could override ResizingTool.updateAdornments not to depend on whether the node is selected. For example, in Diagram initialization:
"resizingTool.updateAdornments": function(part) {
if (part === null || part instanceof go.Link) return; // can't resize links
if (/*part.isSelected &&*/ !this.diagram.isReadOnly) {
var resizeObj = part.resizeObject;
var adornment = part.findAdornment(this.name);
if (resizeObj !== null && part.canResize() && part.actualBounds.isReal() && part.isVisible() && resizeObj.actualBounds.isReal() && resizeObj.isVisibleObject()) {
if (adornment === null || adornment.adornedObject !== resizeObj) {
adornment = this.makeAdornment(resizeObj);
}
if (adornment !== null) {
var angle = resizeObj.getDocumentAngle();
this.updateResizeHandles(adornment, angle); // fix up any cursors to point the right way
part.addAdornment(this.name, adornment);
return;
}
}
}
part.removeAdornment(this.name);
}
Thanks! Solve the problem perfectly.