|
@@ -70,7 +70,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
} // Set isZoneSelectable
|
|
|
|
|
|
/** 高亮item */
|
|
|
- hightLight: HighlightItem = new HighlightItem(null, new SPoint(), 0);
|
|
|
+ hightLight: HighlightItem = new HighlightItem(null);
|
|
|
/** 是否开启吸附 */
|
|
|
private _isAbsorbing: boolean = false;
|
|
|
get isAbsorbing(): boolean {
|
|
@@ -232,6 +232,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
/**
|
|
|
* 切换业务空间
|
|
|
*
|
|
|
+ * @param zoneitem 需要隐藏的业务空间
|
|
|
*/
|
|
|
changeSelectZone(zoneitem: ZoneItem): void {
|
|
|
this.zoneList.map(zone => {
|
|
@@ -245,7 +246,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
/**
|
|
|
* 吸附空间
|
|
|
*
|
|
|
- * @param 鼠标事件对象
|
|
|
+ * @param event 鼠标事件对象
|
|
|
*/
|
|
|
onMouseMove(event: SMouseEvent): boolean {
|
|
|
super.onMouseMove(event);
|
|
@@ -259,7 +260,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
/**
|
|
|
* 吸附空间
|
|
|
*
|
|
|
- * @param 鼠标事件对象
|
|
|
+ * @param event 鼠标事件对象
|
|
|
*/
|
|
|
absorbSpace(event: SMouseEvent): void {
|
|
|
let absorbLen = 1000;
|
|
@@ -291,7 +292,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
* @param maxX 空间区域
|
|
|
* @param maxY 空间区域
|
|
|
*/
|
|
|
- isPointInAbsorbArea(
|
|
|
+ static isPointInAbsorbArea(
|
|
|
p: SPoint,
|
|
|
minX: number,
|
|
|
maxX: number,
|
|
@@ -301,7 +302,7 @@ export class DivideFloorScene extends FloorScene {
|
|
|
let rect = new SRect(
|
|
|
minX - 1000,
|
|
|
minY - 1000,
|
|
|
- maxX - minX + 200,
|
|
|
+ maxX - minX + 2000,
|
|
|
maxY - minY + 2000
|
|
|
);
|
|
|
return rect.contains(p.x, p.y);
|
|
@@ -310,16 +311,16 @@ export class DivideFloorScene extends FloorScene {
|
|
|
/**
|
|
|
* 吸附点
|
|
|
*
|
|
|
- * @param 鼠标事件对象
|
|
|
- * @param 吸附距离
|
|
|
- * @return 吸附的点
|
|
|
+ * @param event 鼠标事件对象
|
|
|
+ * @param absorbLen 吸附距离
|
|
|
+ * @return MinDis 吸附的点
|
|
|
*/
|
|
|
absorbPoint(event: SMouseEvent, absorbLen: number): MinDis {
|
|
|
let minPointDis = Number.MAX_SAFE_INTEGER;
|
|
|
let Point;
|
|
|
this.spaceList.map(space => {
|
|
|
if (
|
|
|
- this.isPointInAbsorbArea(
|
|
|
+ DivideFloorScene.isPointInAbsorbArea(
|
|
|
new SPoint(event.x, event.y),
|
|
|
space.minX,
|
|
|
space.maxX,
|
|
@@ -353,16 +354,16 @@ export class DivideFloorScene extends FloorScene {
|
|
|
/**
|
|
|
* 吸附线
|
|
|
*
|
|
|
- * @param 鼠标事件对象
|
|
|
- * @param 吸附距离
|
|
|
- * @return 吸附的线
|
|
|
+ * @param event 鼠标事件对象
|
|
|
+ * @param absorbLen 吸附距离
|
|
|
+ * @return PointToLine 吸附的线
|
|
|
*/
|
|
|
absorbLine(event: SMouseEvent, absorbLen: number): PointToLine {
|
|
|
let minPointDis = Number.MAX_SAFE_INTEGER;
|
|
|
let Point, Line;
|
|
|
this.spaceList.map(space => {
|
|
|
if (
|
|
|
- this.isPointInAbsorbArea(
|
|
|
+ DivideFloorScene.isPointInAbsorbArea(
|
|
|
new SPoint(event.x, event.y),
|
|
|
space.minX,
|
|
|
space.maxX,
|