@@ -39,7 +39,6 @@ const MAX_CACHE_ENTRIES = 38000; // set to never allows the cache array over 480
3939export class CysConverter {
4040
4141 /**
42- *
4342 * @param {object } plot
4443 */
4544 constructor ( plot ) {
@@ -57,8 +56,8 @@ export class CysConverter {
5756
5857 /**
5958 *
60- * @param wp world point
61- * @param imp Image Point
59+ * @param { WorldPt } wp world point
60+ * @param { ImagePt } imp Image Point
6261 */
6362 putInConversionCache ( wp , imp ) {
6463 if ( SimpleMemCache . size ( this . plotImageId ) < MAX_CACHE_ENTRIES ) {
@@ -72,8 +71,8 @@ export class CysConverter {
7271
7372 /**
7473 * Determine if a world point is in data Area of the plot and is not null
75- * @param iwPt the point to test.
76- * @return {boolean } true if it is in the data boundaries, false if not.
74+ * @param { WorldPt } iwPt the point to test.
75+ * @returns {boolean } true if it is in the data boundaries, false if not.
7776 */
7877 imagePointInData ( iwPt ) {
7978 var retval = false ;
@@ -89,8 +88,8 @@ export class CysConverter {
8988
9089 /**
9190 * Determine if a image point is in the plot boundaries and is not null.
92- * @param pt the point to test.
93- * @return {boolean } true if it is in the boundaries, false if not.
91+ * @param { Point } pt the point to test.
92+ * @returns {boolean } true if it is in the boundaries, false if not.
9493 */
9594 pointInData ( pt ) {
9695 if ( ! isValidPoint ( pt ) ) return false ;
@@ -101,6 +100,7 @@ export class CysConverter {
101100 /**
102101 * This method returns false it the point is definitely not in plot. It returns true if the point might be in the plot.
103102 * Used for tossing out points that we know that are not in plot without having to do all the math. It is much faster.
103+ * @param {WorldPt } wp
104104 * @return {boolean } true in we guess it might be in the bounds, false if we know that it is not in the bounds
105105 */
106106 pointInPlotRoughGuess ( wp ) {
@@ -117,8 +117,8 @@ export class CysConverter {
117117
118118 /**
119119 * Determine if a image point is in the plot boundaries and is not null.
120- * @param ipt the point to test.
121- * @return boolean true if it is in the boundaries, false if not.
120+ * @param { ImagePt } ipt the point to test.
121+ * @returns boolean true if it is in the boundaries, false if not.
122122 */
123123 imageWorkSpacePtInPlot ( ipt ) {
124124 if ( ! ipt ) return false ;
@@ -128,7 +128,7 @@ export class CysConverter {
128128
129129 /**
130130 * Determine if a image point is in the plot boundaries and is not null
131- * @param pt the point to test.
131+ * @param { Point } pt the point to test.
132132 * @return {boolean } true if it is in the boundaries, false if not.
133133 */
134134 pointInPlot ( pt ) {
@@ -149,9 +149,9 @@ export class CysConverter {
149149 }
150150
151151 /**
152- * test to see if the input is in the view port and is not null
153- * @param vpt
154- * @return {boolean }
152+ * @desc Test to see if the input is in the view port and is not null.
153+ * @param { Object } vpt
154+ * @returns {boolean }
155155 */
156156 viewPortPointInViewPort ( vpt ) {
157157 if ( ! vpt || ! vpt . type || vpt . type !== Point . VP_PT ) return false ;
@@ -162,9 +162,9 @@ export class CysConverter {
162162
163163
164164 /**
165- * Determine if a point is in the view port boundaries and is not null.
166- * @param pt the point to test.
167- * @return {boolean } true if it is in the boundaries, false if not.
165+ * @desc Determine if a point is in the view port boundaries and is not null.
166+ * @param { Point } pt the point to test.
167+ * @returns {boolean } true if it is in the boundaries, false if not.
168168 */
169169 pointInViewPort ( pt ) {
170170 if ( ! isValidPoint ( pt ) ) return false ;
@@ -219,8 +219,8 @@ export class CysConverter {
219219 }
220220
221221 /**
222- * return a ImageWorkspacePt from the screen point
223- * @param screenPt
222+ * @description Return a ImageWorkspacePt from the screen point.
223+ * @param { ScreenPt } screenPt
224224 * @param {number } [altZoomLevel]
225225 */
226226 makeIWPtFromSPt ( screenPt , altZoomLevel ) {
@@ -235,7 +235,6 @@ export class CysConverter {
235235
236236
237237 /**
238- * Return the ImagePt coordinates given Pt
239238 * @param {object } pt the point to translate
240239 * @return ImagePt the image coordinates
241240 */
@@ -266,7 +265,8 @@ export class CysConverter {
266265
267266 /**
268267 * return a ImagePoint from a ImageWorkspace point
269- * @param iwPt
268+ * @param {ImageWpt } iwPt
269+ * returns ImagePt
270270 */
271271 static makeIPtFromIWPt ( iwPt ) {
272272 if ( ! iwPt ) return null ;
@@ -275,9 +275,9 @@ export class CysConverter {
275275
276276
277277 /**
278- * Return the image coordinates given a WorldPt class
279- * @param wpt the class containing the point in sky coordinates
280- * @return ImagePt the translated coordinates
278+ * @desc Return the image coordinates given a WorldPt class.
279+ * @param { WorldPt } wpt the class containing the point in sky coordinates
280+ * @returns ImagePt the translated coordinates
281281 */
282282 getImageCoordsFromWorldPt ( wpt ) {
283283 if ( ! wpt ) return null ;
@@ -308,11 +308,11 @@ export class CysConverter {
308308
309309
310310 /**
311- * Return the ViewPortCoords coordinates given for Pt
312- * @param pt the point to translate
311+ * @desc Return the ViewPortCoords coordinates given for Pt.
312+ * @param { Point } pt the point to translate
313313 * @param {number } [altZoomLevel], only use this parameter it you want to compute the point for a zoom level that
314314 * if different than what the plotted zoom level
315- * @return WorldPt the world coordinates
315+ * @returns WorldPt the world coordinates
316316 */
317317 getViewPortCoords ( pt , altZoomLevel ) {
318318 if ( ! isValidPoint ( pt ) ) return null ;
@@ -341,8 +341,8 @@ export class CysConverter {
341341
342342
343343 /**
344- * return a ViewPort Point from a ScreenPt
345- * @param pt
344+ * @desc Return a ViewPort Point from a ScreenPt.
345+ * @param { PointPt } pt
346346 */
347347 makeVPtFromSPt ( pt ) {
348348 if ( ! pt ) return null ;
@@ -352,9 +352,9 @@ export class CysConverter {
352352
353353
354354 /**
355- * An optimized conversion of WorldPt to viewport point.
356- * @param {object } wpt a world pt
357- * @param {object } retPt mutable returned ViewPort Point, this object will be written to
355+ * @desc An optimized conversion of WorldPt to viewport point.
356+ * @param {Object } wpt a world pt
357+ * @param {Object } retPt mutable returned ViewPort Point, this object will be written to
358358 * @return {boolean } success or failure
359359 */
360360 getViewPortCoordsOptimize ( wpt , retPt ) {
@@ -425,7 +425,7 @@ export class CysConverter {
425425
426426 /**
427427 * Return the screen coordinates given Pt
428- * @param pt the point to translate
428+ * @param { PointPt } pt the point to translate
429429 * @param {number } [altZoomLevel], only use this parameter it you want to compute the point for a zoom level that
430430 * if different than what the plotted zoom level
431431 * @return ScreenPt the screen coordinates
@@ -466,7 +466,7 @@ export class CysConverter {
466466
467467 /**
468468 *
469- * @param {object } iwpt ImageWorkspacePt
469+ * @param {Object } iwpt ImageWorkspacePt
470470 * @param {number } [altZoomLevel]
471471 */
472472 makeSPtFromIWPt ( iwpt , altZoomLevel ) {
@@ -482,13 +482,11 @@ export class CysConverter {
482482//========================================================================================
483483
484484
485-
486485 /**
487- * Return the sky coordinates given a image x (fsamp) and y (fline)
488- * package in a ImageWorkSpacePt class
489- * @param pt the point to convert
490- * @param outputCoordSys (optional) The coordinate system to return, default to coordinate system of image
491- * @return WorldPt the translated coordinates
486+ * @desc Return the sky coordinates given a image x (fsamp) and y (fline)
487+ * @param {PointPt } pt the point to convert
488+ * @param {CoordinateSys } outputCoordSys (optional) The coordinate system to return, default to coordinate system of image
489+ * @returns WorldPt the translated coordinates
492490 */
493491 getWorldCoords ( pt , outputCoordSys ) {
494492 if ( ! isValidPoint ( pt ) ) return null ;
@@ -560,8 +558,8 @@ export class CysConverter {
560558
561559 /**
562560 *
563- * @param {object } plot - the image
564- * @return {CysConverter }
561+ * @param {Object } plot - the image
562+ * @returns {CysConverter }
565563 */
566564 static make ( plot ) {
567565 return plot ? new CysConverter ( plot ) : null ;
@@ -572,9 +570,11 @@ export class CysConverter {
572570
573571/**
574572 *
575- * @param pt
573+ * @param { PointPt } pt
576574 * @return {* }
577575 * @public
576+ * @memberof firefly.util.image.CCUtil
577+ *
578578 */
579579function getWorldPtRepresentation ( pt ) {
580580 if ( ! isValidPoint ( pt ) ) return null ;
0 commit comments