mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-12 15:49:18 -08:00
restore setrotation and getrotation in aladin object API. #211
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user