(spec, scope)
| 148581 | } |
| 148582 | const angleExpr = `item.orient==="${Left}"?-90:item.orient==="${Right}"?90:0`; |
| 148583 | function parseTitle(spec, scope) { |
| 148584 | spec = (0, _vegaUtil.isString)(spec) ? { |
| 148585 | text: spec |
| 148586 | } : spec; |
| 148587 | const _ = lookup(spec, scope.config.title), encode = spec.encode || {}, userEncode = encode.group || {}, name = userEncode.name || undefined, interactive3 = userEncode.interactive, style = userEncode.style, children = []; // single-element data source for group title |
| 148588 | const datum = {}, dataRef = ref(scope.add(Collect(null, [ |
| 148589 | datum |
| 148590 | ]))); // include title text |
| 148591 | children.push(buildTitle(spec, _, titleEncode(spec), dataRef)); // include subtitle text |
| 148592 | if (spec.subtitle) children.push(buildSubTitle(spec, _, encode.subtitle, dataRef)); |
| 148593 | // parse title specification |
| 148594 | return parseMark(guideGroup({ |
| 148595 | role: TitleRole, |
| 148596 | from: dataRef, |
| 148597 | encode: groupEncode(_, userEncode), |
| 148598 | marks: children, |
| 148599 | aria: _("aria"), |
| 148600 | description: _("description"), |
| 148601 | zindex: _("zindex"), |
| 148602 | name, |
| 148603 | interactive: interactive3, |
| 148604 | style |
| 148605 | }), scope); |
| 148606 | } // provide backwards-compatibility for title custom encode; |
| 148607 | // the top-level encode block has been *deprecated*. |
| 148608 | function titleEncode(spec) { |
| 148609 | const encode = spec.encode; |
no test coverage detected