MCPcopy Index your code
hub / github.com/microsoft/SandDance / buildSubTitle

Function buildSubTitle

docs/app/js/sanddance-app.js:148687–148736  ·  view source on GitHub ↗
(spec, _, userEncode, dataRef)

Source from the content-addressed store, hash-verified

148685 }, userEncode);
148686}
148687function buildSubTitle(spec, _, userEncode, dataRef) {
148688 const zero2 = {
148689 value: 0
148690 }, text = spec.subtitle, encode = {
148691 enter: {
148692 opacity: zero2
148693 },
148694 update: {
148695 opacity: {
148696 value: 1
148697 }
148698 },
148699 exit: {
148700 opacity: zero2
148701 }
148702 };
148703 addEncoders(encode, {
148704 text: text,
148705 align: {
148706 signal: "item.mark.group.align"
148707 },
148708 angle: {
148709 signal: "item.mark.group.angle"
148710 },
148711 limit: {
148712 signal: "item.mark.group.limit"
148713 },
148714 baseline: "top",
148715 dx: _("dx"),
148716 dy: _("dy"),
148717 fill: _("subtitleColor"),
148718 font: _("subtitleFont"),
148719 fontSize: _("subtitleFontSize"),
148720 fontStyle: _("subtitleFontStyle"),
148721 fontWeight: _("subtitleFontWeight"),
148722 lineHeight: _("subtitleLineHeight")
148723 }, {
148724 // update
148725 align: _("align"),
148726 angle: _("angle"),
148727 baseline: _("baseline")
148728 });
148729 return guideMark({
148730 type: TextMark,
148731 role: TitleSubtitleRole,
148732 style: GroupSubtitleStyle,
148733 from: dataRef,
148734 encode
148735 }, userEncode);
148736}
148737function parseData(data, scope) {
148738 const transforms = [];
148739 if (data.transform) data.transform.forEach((tx)=>{

Callers 1

parseTitleFunction · 0.70

Calls 3

addEncodersFunction · 0.70
_Function · 0.70
guideMarkFunction · 0.70

Tested by

no test coverage detected