fix arc drawing

This commit is contained in:
Val Erastov 2014-10-14 22:57:41 -07:00
parent 5ae384f66e
commit c441cd3e34
2 changed files with 2 additions and 13 deletions

View file

@ -56,9 +56,8 @@ TCAD.TWO.Arc.prototype.drawImpl = function(ctx, scale) {
var r = this.radiusForDrawing();
var startAngle = Math.atan2(this.a.y - this.c.y, this.a.x - this.c.x);
var endAngle;
if ( this.a.isCoincidentTo(this.b) ||
(TCAD.utils.areEqual(this.a.x, this.b.x, TCAD.utils.TOLERANCE) &&
TCAD.utils.areEqual(this.a.y, this.b.y, TCAD.utils.TOLERANCE))) {
if (TCAD.utils.areEqual(this.a.x, this.b.x, TCAD.TOLERANCE) &&
TCAD.utils.areEqual(this.a.y, this.b.y, TCAD.TOLERANCE)) {
endAngle = startAngle + 2 * Math.PI;
} else {
endAngle = Math.atan2(this.b.y - this.c.y, this.b.x - this.c.x);

View file

@ -292,16 +292,6 @@ TCAD.TWO.SketchObject.prototype.visit = function(onlyVisible, h) {
return h(this);
};
TCAD.TWO.SketchObject.prototype.isCoincidentTo = function(other) {
for (var i = 0; i < this.linked.length; i++) {
var obj = this.linked[i];
if (obj.id === other.id) {
return true;
}
}
return false;
};
TCAD.TWO.SketchObject.prototype._translate = function(dx, dy, translated) {
translated[this.id] = 'x';
for (var i = 0; i < this.linked.length; ++i) {