fix range

This commit is contained in:
mkwiser 2014-09-20 21:31:45 +08:00
parent 97b49f3129
commit 233edf08bc
2 changed files with 13 additions and 7 deletions

View File

@ -135,10 +135,6 @@ define(
title: '添加圆'
},
rescale: {
title: '重置缩放'
},
undo: {
title: '撤销'
},
@ -150,8 +146,13 @@ define(
add_referenceline: {
title: '添加参考线'
},
clearreferenceline: {
title: '清除参考线'
},
rescale: {
title: '重置缩放'
}
};

View File

@ -66,11 +66,16 @@ define(
up: function(e) {
if(1 == e.which) {
if(this.selectionBox) {
var bound = {
x: Math.min(this.selectionBox.x, this.selectionBox.x + this.selectionBox.width),
y: Math.min(this.selectionBox.y, this.selectionBox.y + this.selectionBox.height),
width: Math.abs(this.selectionBox.width),
height: Math.abs(this.selectionBox.height),
}
// 对shape进行多选
if(this.selectionBox.width >= 20 && this.selectionBox.height >= 20) {
if(bound.width >= 20 && bound.height >= 20) {
var shapes;
if(shapes = selectShapes.call(this, this.selectionBox)) {
if(shapes = selectShapes.call(this, bound)) {
this.setMode('shapes', shapes);
return;
}