@@ -227,23 +227,12 @@ function dealWithMods(drawLayer,action) {
227227
228228
229229export function getUnitStyle ( cc , world ) {
230- if ( isUndefined ( world ) ) {
231- world = hasWCSProjection ( cc ) ;
232- }
233230
234- if ( ! world ) {
231+ if ( ! cc || ! world ) {
235232 return UNIT_PIXEL_ONLY ;
236233 } else {
237- return UNIT_NO_PIXEL ;
238- }
239- /*
240- const plot= primePlot(visRoot(),cc.plotId);
241- const aHiPS = isHiPS(plot);
242- if (aHiPS) {
243- return UNIT_NO_PIXEL;
234+ return isHiPS ( primePlot ( visRoot ( ) , cc . plotId ) ) ? UNIT_NO_PIXEL : UNIT_ALL ;
244235 }
245- return UNIT_ALL;
246- */
247236}
248237
249238export function getUnitPreference ( unitStyle ) {
@@ -317,7 +306,6 @@ function drag(drawLayer,action) {
317306 const { imagePt, plotId} = action . payload ;
318307 const plot = primePlot ( visRoot ( ) , plotId ) ;
319308 const cc = CsysConverter . make ( plot ) ;
320- if ( ! cc ) return ;
321309
322310 const newFirst = drawLayer . moveHead ? drawLayer . firstPt : imagePt ;
323311 const newCurrent = drawLayer . moveHead ? imagePt : drawLayer . currentPt ;
@@ -449,7 +437,7 @@ function computeDistance(pt1, pt2, cc, pref) {
449437 * @return {Array }
450438 */
451439function makeSelectObj ( firstPt , currentPt , offsetCal , cc ) {
452- const world = hasWCSProjection ( cc ) ;
440+ const world = cc ? hasWCSProjection ( cc ) : false ;
453441 const unitStyle = getUnitStyle ( cc , world ) ;
454442 const pref = getUnitPreference ( unitStyle ) ;
455443
0 commit comments