Skip to content

Commit

Permalink
🎨 Add default value for image type in getViewData function
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Jun 14, 2024
1 parent 8cda872 commit daa0958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/Aladin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2199,11 +2199,11 @@ aladin.on("positionChanged", ({ra, dec}) => {
* @memberof Aladin
*
* @param {string} dataType The type of data to return. Can be 'url', 'arraybuffer' or 'blob'
* @param {string} imgType The type of image to return. Can be 'image/png' or 'image/jpeg'
* @param {string} [imgType='image/png'] The type of image to return. Can be 'image/png', 'image/jpeg' or 'image/webp'
* @param {boolean} [withLogo=true] Display or not the Aladin Lite logo
* @returns {Promise<any>}
*/
Aladin.prototype.getViewData = async function (dataType, imgType, withLogo=true){
Aladin.prototype.getViewData = async function (dataType, imgType="image/png", withLogo=true){
switch (dataType) {
case "url":
return await this.view.getCanvasDataURL(imgType, null, null, withLogo);
Expand Down

0 comments on commit daa0958

Please sign in to comment.