Remove setRotationCenter API

This commit is contained in:
adroitwhiz
2020-01-30 01:04:33 -05:00
parent 1c0928f441
commit d9c854f1fc
6 changed files with 24 additions and 82 deletions

View File

@@ -58,16 +58,6 @@ class SVGSkin extends Skin {
return this._svgRenderer.size;
}
/**
* Set the origin, in object space, about which this Skin should rotate.
* @param {number} x - The x coordinate of the new rotation center.
* @param {number} y - The y coordinate of the new rotation center.
*/
setRotationCenter (x, y) {
const viewOffset = this._svgRenderer.viewOffset;
super.setRotationCenter(x - viewOffset[0], y - viewOffset[1]);
}
/**
* Create a MIP for a given scale.
* @param {number} scale - The relative size of the MIP
@@ -174,7 +164,10 @@ class SVGSkin extends Skin {
this.resetMIPs();
if (typeof rotationCenter === 'undefined') rotationCenter = this.calculateRotationCenter();
this.setRotationCenter.apply(this, rotationCenter);
const viewOffset = this._svgRenderer.viewOffset;
this._rotationCenter[0] = rotationCenter[0] - viewOffset[0];
this._rotationCenter[1] = rotationCenter[1] - viewOffset[1];
this.emit(Skin.Events.WasAltered);
});
}