%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
/* *
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import U from '../Core/Utilities.js';
var isNumber = U.isNumber;
/* *
*
* Functions
*
* */
/**
* Handles the drawing of a component.
* Can be used for any type of component that reserves the graphic property,
* and provides a shouldDraw on its context.
*
* @private
*
* @todo add type checking.
* @todo export this function to enable usage
*/
function draw(point, params) {
var animatableAttribs = params.animatableAttribs, onComplete = params.onComplete, css = params.css, renderer = params.renderer;
var animation = (point.series && point.series.chart.hasRendered) ?
// Chart-level animation on updates
void 0 :
// Series-level animation on new points
(point.series &&
point.series.options.animation);
var graphic = point.graphic;
params.attribs = params.attribs || {};
// Assigning class in dot notation does go well in IE8
// eslint-disable-next-line dot-notation
params.attribs['class'] = point.getClassName();
if ((point.shouldDraw())) {
if (!graphic) {
point.graphic = graphic = params.shapeType === 'text' ?
renderer.text() :
renderer[params.shapeType](params.shapeArgs || {});
graphic.add(params.group);
}
if (css) {
graphic.css(css);
}
graphic
.attr(params.attribs)
.animate(animatableAttribs, params.isNew ? false : animation, onComplete);
}
else if (graphic) {
var destroy_1 = function () {
point.graphic = graphic = (graphic && graphic.destroy());
if (typeof onComplete === 'function') {
onComplete();
}
};
// animate only runs complete callback if something was animated.
if (Object.keys(animatableAttribs).length) {
graphic.animate(animatableAttribs, void 0, function () { return destroy_1(); });
}
else {
destroy_1();
}
}
}
/* *
*
* Default Export
*
* */
var DrawPointUtilities = {
draw: draw
};
export default DrawPointUtilities;