MCPcopy Index your code
hub / github.com/tdewolff/minify / defaultLoading

Function defaultLoading

_benchmarks/sample_echarts.js:23497–23603  ·  view source on GitHub ↗

* @param {module:echarts/ExtensionAPI} api * @param {Object} [opts] * @param {string} [opts.text] * @param {string} [opts.color] * @param {string} [opts.textColor] * @return {module:zrender/Element}

(api, opts)

Source from the content-addressed store, hash-verified

23495 */
23496
23497 function defaultLoading(api, opts) {
23498 opts = opts || {};
23499 defaults(opts, {
23500 text: 'loading',
23501 textColor: '#000',
23502 fontSize: 12,
23503 fontWeight: 'normal',
23504 fontStyle: 'normal',
23505 fontFamily: 'sans-serif',
23506 maskColor: 'rgba(255, 255, 255, 0.8)',
23507 showSpinner: true,
23508 color: '#5470c6',
23509 spinnerRadius: 10,
23510 lineWidth: 5,
23511 zlevel: 0
23512 });
23513 var group = new Group();
23514 var mask = new Rect({
23515 style: {
23516 fill: opts.maskColor
23517 },
23518 zlevel: opts.zlevel,
23519 z: 10000
23520 });
23521 group.add(mask);
23522 var textContent = new ZRText({
23523 style: {
23524 text: opts.text,
23525 fill: opts.textColor,
23526 fontSize: opts.fontSize,
23527 fontWeight: opts.fontWeight,
23528 fontStyle: opts.fontStyle,
23529 fontFamily: opts.fontFamily
23530 },
23531 zlevel: opts.zlevel,
23532 z: 10001
23533 });
23534 var labelRect = new Rect({
23535 style: {
23536 fill: 'none'
23537 },
23538 textContent: textContent,
23539 textConfig: {
23540 position: 'right',
23541 distance: 10
23542 },
23543 zlevel: opts.zlevel,
23544 z: 10001
23545 });
23546 group.add(labelRect);
23547 var arc;
23548
23549 if (opts.showSpinner) {
23550 arc = new Arc({
23551 shape: {
23552 startAngle: -PI$3 / 2,
23553 endAngle: -PI$3 / 2 + 0.1,
23554 r: opts.spinnerRadius

Callers

nothing calls this directly

Calls 1

defaultsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…