|
@@ -246,19 +246,20 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
|
|
}
|
|
}
|
|
if (!isClickSelRect) {
|
|
if (!isClickSelRect) {
|
|
//点击在选框之外
|
|
//点击在选框之外
|
|
-
|
|
|
|
- if (!this._downClickedCompId) {
|
|
|
|
- //没有点击到组件
|
|
|
|
- const view = this.viewport?.getBoundingClientRect() as any;
|
|
|
|
- const isOut =
|
|
|
|
- e.clientX < view.left ||
|
|
|
|
- e.clientX > view.right ||
|
|
|
|
- e.clientY < view.top ||
|
|
|
|
- e.clientY > view.bottom;
|
|
|
|
- if (!isOut) {
|
|
|
|
- this._state = MODE_SEL_RECT;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this._state = MODE_SEL_RECT;
|
|
|
|
+
|
|
|
|
+ // if (!this._downClickedCompId) {
|
|
|
|
+ // //没有点击到组件
|
|
|
|
+ // const view = this.viewport?.getBoundingClientRect() as any;
|
|
|
|
+ // const isOut =
|
|
|
|
+ // e.clientX < view.left ||
|
|
|
|
+ // e.clientX > view.right ||
|
|
|
|
+ // e.clientY < view.top ||
|
|
|
|
+ // e.clientY > view.bottom;
|
|
|
|
+ // if (!isOut) {
|
|
|
|
+ // this._state = MODE_SEL_RECT;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
//else {//点击到选框之外的组件, 把时间放到mouseup 时相应.
|
|
//else {//点击到选框之外的组件, 把时间放到mouseup 时相应.
|
|
// this._state = MODE_MOVING;
|
|
// this._state = MODE_MOVING;
|
|
// const obj = this.compMap[comps[0].id];
|
|
// const obj = this.compMap[comps[0].id];
|
|
@@ -515,11 +516,13 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
|
|
//选择空间转 streamCard空间
|
|
//选择空间转 streamCard空间
|
|
const card = this.store.currStreamCard;
|
|
const card = this.store.currStreamCard;
|
|
const box = card.$el.getBoundingClientRect();
|
|
const box = card.$el.getBoundingClientRect();
|
|
|
|
+ const s = this.controls.editorCtrl.state.scale;
|
|
|
|
+
|
|
this.rectSelect(
|
|
this.rectSelect(
|
|
- this._lastSelRect[0] - box.left,
|
|
|
|
- this._lastSelRect[1] - box.top,
|
|
|
|
- this._lastSelRect[2],
|
|
|
|
- this._lastSelRect[3],
|
|
|
|
|
|
+ (this._lastSelRect[0] - box.left)/s,
|
|
|
|
+ (this._lastSelRect[1] - box.top) / s,
|
|
|
|
+ this._lastSelRect[2] / s,
|
|
|
|
+ this._lastSelRect[3] / s,
|
|
e
|
|
e
|
|
);
|
|
);
|
|
}
|
|
}
|