|
|
@@ -79,7 +79,7 @@ Pan.prototype.startPan = (function() {
|
|
|
this.build.finishWall();
|
|
|
} else { //开始画墙
|
|
|
this.build.buildwallState = 2;
|
|
|
- this.build.BuildingWall(point);
|
|
|
+ this.build.BuildingWall(args.point);
|
|
|
}
|
|
|
this.layer.control.refreshCanvas = true;
|
|
|
},
|
|
|
@@ -122,6 +122,7 @@ Pan.prototype.startPan = (function() {
|
|
|
// this.f_draggingBackGround = true;
|
|
|
}
|
|
|
|
|
|
+ console.log(this.currentState.selectWallSet)
|
|
|
//当前选择墙面
|
|
|
if (this.currentState.selectWallSet != null && this.currentState.selectWallSet.type == 1) {
|
|
|
this.f_draggingBackGround = false;
|
|
|
@@ -240,8 +241,9 @@ Pan.prototype.pan = function () {
|
|
|
},
|
|
|
// 拖拽墙面的角度
|
|
|
f_draggingWallCorner: function (args) {
|
|
|
+ // console.log()
|
|
|
this.move.moveWallcorner(
|
|
|
- args.wallid,
|
|
|
+ this.currentState.selectWallSet.id,
|
|
|
this.currentState.currentstartlinePointIndex,
|
|
|
args.point
|
|
|
);
|
|
|
@@ -293,8 +295,10 @@ Pan.prototype.pan = function () {
|
|
|
strategy.__selectStair(args)
|
|
|
|
|
|
} else if (this.layer.data2d.wallIds.length > 0) {
|
|
|
+
|
|
|
//当前点是否在墙上
|
|
|
this.currentState.selectWallSet = this.calculateElement.wallsContain(args.point);
|
|
|
+ this.currentState.selectWallSet && console.log(this.currentState.selectWallSet)
|
|
|
|
|
|
this.currentState.selectWallSet ?
|
|
|
strategy.__selectWallSet(args) :
|
|
|
@@ -478,7 +482,6 @@ Pan.prototype.pan = function () {
|
|
|
|
|
|
for (var i = 0, keys = Object.keys(strategy); i < keys.length; i++) {
|
|
|
if (this[keys[i]]) {
|
|
|
- console.log(this[keys[i]])
|
|
|
strategy[keys[i]](args);
|
|
|
break;
|
|
|
}
|
|
|
@@ -604,7 +607,16 @@ Pan.prototype.active = function () {
|
|
|
this.div.addEventListener("mousedown", Pan.prototype.startPan.bind(this), true);
|
|
|
this.div.addEventListener("mousemove", Pan.prototype.pan.bind(this), true);
|
|
|
this.div.addEventListener("mouseup", Pan.prototype.endPan.bind(this), true);
|
|
|
- this.div.addEventListener("dblclick", Pan.prototype.doubleclick.bind(this), true);
|
|
|
+
|
|
|
+ var doubleclick = Pan.prototype.doubleclick.bind(this)
|
|
|
+ var startTime = null
|
|
|
+ this.div.addEventListener("click", function() {
|
|
|
+ if (startTime && Date.now() - startTime <= 300) {
|
|
|
+ doubleclick.apply(this, arguments)
|
|
|
+ } else {
|
|
|
+ startTime = Date.now()
|
|
|
+ }
|
|
|
+ }, true);
|
|
|
};
|
|
|
|
|
|
Pan.prototype.reset = function () {
|