Align with location object

On the DrawCommandHandler.js align function is simple and efficient, below↓,
But can i align with location object ? not the whole node outer bound.

DrawCommandHandler.prototype.alignLeft = function() {
  var diagram = this.diagram;
  diagram.startTransaction("aligning left");
  var minPosition = Infinity;
  diagram.selection.each(function(current) {
    if (current instanceof go.Link) return; // skips over go.Link
    minPosition = Math.min(current.position.x, minPosition);
  });
  diagram.selection.each(function(current) {
    if (current instanceof go.Link) return; // skips over go.Link
    current.move(new go.Point(minPosition, current.position.y));
  });
  diagram.commitTransaction("aligning left");
};
    diagram.startTransaction("aligning left");
    var minLocation = Infinity;
    diagram.selection.each(function(current) {
      if (current instanceof go.Link) return; // skips over go.Link
      minLocation = Math.min(current.location.x, minLocation);
    });
    diagram.selection.each(function(current) {
      if (current instanceof go.Link) return; // skips over go.Link
      current.moveTo(minLocation, current.location.y, true);
    });
    diagram.commitTransaction("aligning left");

Yes, good, this works when the Location spot is top left, but went Nodes have rotation it did not work,
but Ok, I will do it myself, more one thing, could you tell me how I get location object width ?

Depends on which coordinate system you want the result to be in.

Maybe actualBounds.
https://gojs.net/latest/intro/sizing.html#MeasuredAndActualSizes

Or call getDocumentBounds.
https://gojs.net/latest/api/symbols/GraphObject.html#getDocumentBounds

thank you I will research it.