restore setrotation and getrotation in aladin object API. #211

This commit is contained in:
Matthieu Baumann
2025-02-13 23:40:12 +01:00
parent 4eea3d3bf9
commit 9049fec040

View File

@@ -1982,17 +1982,19 @@ export let Aladin = (function () {
this.view.decreaseZoom(0.01); this.view.decreaseZoom(0.01);
}; };
/** /**
* Set the view center rotation in degrees * Set the view center rotation in degrees
* *
* @memberof Aladin * @memberof Aladin
* @param {number} rotation - The center rotation in degrees. Positive angles rotates the * @param {number} rotation - The center rotation in degrees. Positive angles rotates the
* view in the counter clockwise order (or towards the east) * view in the counter clockwise order (or towards the east)
*/ */
Aladin.prototype.setViewCenter2NorthPoleAngle = function (rotation) { Aladin.prototype.setRotation = function (rotation) {
this.view.setViewCenter2NorthPoleAngle(rotation); this.view.setViewCenter2NorthPoleAngle(rotation);
}; };
/** /**
* Get the view center to north pole angle in degrees. This is equivalent to getting the 3rd Euler angle * Get the view center to north pole angle in degrees. This is equivalent to getting the 3rd Euler angle
* *
@@ -2000,10 +2002,32 @@ export let Aladin = (function () {
* *
* @returns {number} - Angle between the position center and the north pole * @returns {number} - Angle between the position center and the north pole
*/ */
Aladin.prototype.getViewCenter2NorthPoleAngle = function () { Aladin.prototype.getRotation = function () {
return this.view.wasm.getViewCenter2NorthPoleAngle(); return this.view.wasm.getViewCenter2NorthPoleAngle();
}; };
/**
* Set the view center rotation in degrees
*
* @deprecated Use Aladin.prototype.setRotation instead
*
* @memberof Aladin
* @param {number} rotation - The center rotation in degrees. Positive angles rotates the
* view in the counter clockwise order (or towards the east)
*/
Aladin.prototype.setViewCenter2NorthPoleAngle = Aladin.prototype.setRotation;
/**
* Get the view center to north pole angle in degrees. This is equivalent to getting the 3rd Euler angle
*
* @memberof Aladin
*
* @deprecated
*
* @returns {number} - Angle between the position center and the north pole
*/
Aladin.prototype.getViewCenter2NorthPoleAngle = Aladin.prototype.getRotation;
// @api // @api
// Set the current layer that is targeted // Set the current layer that is targeted
// Rightclicking for changing the cuts is done the targeted layer // Rightclicking for changing the cuts is done the targeted layer