(layout, axref, aro, c, offset, nolog)
| 356 | // You can tell I first wrote this function for shapes only and then learned |
| 357 | // later this was the case for images and annotations :'). |
| 358 | function mapAROCoordToPixel(layout, axref, aro, c, offset, nolog) { |
| 359 | var reftype = Axes.getRefType(aro[axref]); |
| 360 | var ret; |
| 361 | offset = (offset === undefined) ? 0 : offset; |
| 362 | var val = aro[c] + offset; |
| 363 | var axis; |
| 364 | if(reftype === 'range') { |
| 365 | axis = axisIds.id2name(aro[axref]); |
| 366 | ret = pixelCalc.mapRangeToPixel(layout, axis, val, nolog); |
| 367 | } else if(reftype === 'domain') { |
| 368 | axis = axisIds.id2name(aro[axref]); |
| 369 | ret = pixelCalc.mapDomainToPixel(layout, axis, val); |
| 370 | } else if(reftype === 'paper') { |
| 371 | axis = axref[0]; |
| 372 | ret = pixelCalc.mapPaperToPixel(layout, axis, val); |
| 373 | } |
| 374 | return ret; |
| 375 | } |
| 376 | |
| 377 | // compute the bounding box of the shape so that it can be compared with the SVG |
| 378 | // bounding box |
no outgoing calls
no test coverage detected
searching dependent graphs…