fix bound box mode
This commit is contained in:
parent
8c5e54b826
commit
d6bc269096
@ -123,12 +123,12 @@ define(
|
||||
var fontLayer = this.render.getLayer('font');
|
||||
shapes.forEach(function(shapeId) {
|
||||
var shape = fontLayer.getShape(shapeId);
|
||||
var pathBox = computeBoundingBox.computePathBox(shape.points);
|
||||
shape.width = pathBox.width;
|
||||
shape.height = pathBox.height;
|
||||
shape.x = shape.x + pathBox.x;
|
||||
shape.y = shape.y + pathBox.y;
|
||||
shape.points = pathAdjust(shape.points, 1, -pathBox.x, -pathBox.y);
|
||||
var bound = computeBoundingBox.computePath(shape.points);
|
||||
shape.width = bound.width;
|
||||
shape.height = bound.height;
|
||||
shape.x = shape.x + bound.x;
|
||||
shape.y = shape.y + bound.y;
|
||||
shape.points = pathAdjust(shape.points, 1, -bound.x, -bound.y);
|
||||
});
|
||||
fontLayer.refresh();
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ define(
|
||||
event.deltaX = event.x - this.startX;
|
||||
event.deltaY = event.y - this.startY;
|
||||
|
||||
if (event.deltaX >= this.dragDelta || event.deltaY >= this.dragDelta) {
|
||||
if (Math.abs(event.deltaX) >= this.dragDelta || Math.abs(event.deltaY) >= this.dragDelta) {
|
||||
if (!this.isDragging) {
|
||||
this.isDragging = true;
|
||||
this.fire('dragstart', event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user