绘图右键代码调整
This commit is contained in:
parent
61ad60c365
commit
bf0e44d512
@ -131,7 +131,7 @@ class MouseController extends Eventful {
|
|||||||
if (!eventTool.notLeftMouse(e)) {
|
if (!eventTool.notLeftMouse(e)) {
|
||||||
this._dragging = false;
|
this._dragging = false;
|
||||||
}
|
}
|
||||||
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box']) {
|
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box'] && this._previewOrMapDraw ) {
|
||||||
this.eventTarget = this.$jmap.mapDevice['check_box'].instance;
|
this.eventTarget = this.$jmap.mapDevice['check_box'].instance;
|
||||||
this.handleBoundingRect(this.eventTarget);
|
this.handleBoundingRect(this.eventTarget);
|
||||||
var em = this.checkEvent(e);
|
var em = this.checkEvent(e);
|
||||||
@ -311,8 +311,8 @@ class MouseController extends Eventful {
|
|||||||
const dy = originY + this.$jmap.$options.offsetY;
|
const dy = originY + this.$jmap.$options.offsetY;
|
||||||
const x = dx / this.$jmap.$options.scaleRate;
|
const x = dx / this.$jmap.$options.scaleRate;
|
||||||
const y = dy / this.$jmap.$options.scaleRate;
|
const y = dy / this.$jmap.$options.scaleRate;
|
||||||
const width = Math.abs(point1.x - point2.x) / this.$jmap.$options.scaleRate + 10;
|
const width = Math.abs(point1.x - point2.x) / this.$jmap.$options.scaleRate;
|
||||||
const height = Math.abs(point1.y - point2.y) / this.$jmap.$options.scaleRate + 10;
|
const height = Math.abs(point1.y - point2.y) / this.$jmap.$options.scaleRate;
|
||||||
this.$jmap.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
|
this.$jmap.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user