fix split shapes history

This commit is contained in:
kekee000
2015-04-11 22:11:38 +08:00
parent 6932a8e08e
commit 4bb5d5f576
2 changed files with 8 additions and 16 deletions

View File

@@ -157,6 +157,8 @@ define(
fontLayer.refresh();
this.setMode('shapes', shapesCross);
}
return true;
}
return false;

View File

@@ -31,20 +31,6 @@ define(
pathsUtil.rotate(paths, angle);
}
/**
* 翻转图形
*
* @param {Array} shapes 图形集合
* @param {number} xScale x翻转
* @param {number} yScale y翻转
*/
function mirror(shapes, xScale, yScale) {
var paths = shapes.map(function (shape) {
return shape.points;
});
pathsUtil.mirror(paths, xScale, yScale);
}
var support = {
@@ -101,7 +87,9 @@ define(
return false;
}
mirror(shapes, 1, -1);
pathsUtil.flip(shapes.map(function (shape) {
return shape.points;
}));
this.fontLayer.refresh();
this.refreshSelected(shapes);
},
@@ -118,7 +106,9 @@ define(
return false;
}
mirror(shapes, -1, 1);
pathsUtil.mirror(shapes.map(function (shape) {
return shape.points;
}));
this.fontLayer.refresh();
this.refreshSelected(shapes);
}