|
@@ -2033,7 +2033,22 @@ export class EditScence extends SGraphScene {
|
|
|
this.selectContainer.clear()
|
|
|
}
|
|
|
if (this.grabItem instanceof SRectSelectItem) {
|
|
|
- const rect = this.grabItem.boundingRect();
|
|
|
+ let left,top,w,h;
|
|
|
+ if(this.grabItem.startPoint.x < this.grabItem.endPoint.x) {
|
|
|
+ left = this.grabItem.startPoint.x;
|
|
|
+ w = this.grabItem.endPoint.x - this.grabItem.startPoint.x
|
|
|
+ } else {
|
|
|
+ left = this.grabItem.endPoint.x
|
|
|
+ w = this.grabItem.startPoint.x - this.grabItem.endPoint.x
|
|
|
+ }
|
|
|
+ if (this.grabItem.startPoint.y < this.grabItem.endPoint.y) {
|
|
|
+ top = this.grabItem.startPoint.y;
|
|
|
+ h = this.grabItem.endPoint.y - this.grabItem.startPoint.y
|
|
|
+ } else {
|
|
|
+ top = this.grabItem.endPoint.y;
|
|
|
+ h = this.grabItem.startPoint.y - this.grabItem.endPoint.y
|
|
|
+ }
|
|
|
+ const rect = new SRect(left,top,w,h);
|
|
|
this.arrToSelect(this.Nodes, rect)
|
|
|
this.arrToSelect(this.Markers, rect)
|
|
|
this.arrToSelect(this.Relations, rect)
|