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

Function buildTitle

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

Source from the content-addressed store, hash-verified

148635 return extendEncode(encode, userEncode, Skip);
148636}
148637function buildTitle(spec, _, userEncode, dataRef) {
148638 const zero1 = {
148639 value: 0
148640 }, text = spec.text, encode = {
148641 enter: {
148642 opacity: zero1
148643 },
148644 update: {
148645 opacity: {
148646 value: 1
148647 }
148648 },
148649 exit: {
148650 opacity: zero1
148651 }
148652 };
148653 addEncoders(encode, {
148654 text: text,
148655 align: {
148656 signal: "item.mark.group.align"
148657 },
148658 angle: {
148659 signal: "item.mark.group.angle"
148660 },
148661 limit: {
148662 signal: "item.mark.group.limit"
148663 },
148664 baseline: "top",
148665 dx: _("dx"),
148666 dy: _("dy"),
148667 fill: _("color"),
148668 font: _("font"),
148669 fontSize: _("fontSize"),
148670 fontStyle: _("fontStyle"),
148671 fontWeight: _("fontWeight"),
148672 lineHeight: _("lineHeight")
148673 }, {
148674 // update
148675 align: _("align"),
148676 angle: _("angle"),
148677 baseline: _("baseline")
148678 });
148679 return guideMark({
148680 type: TextMark,
148681 role: TitleTextRole,
148682 style: GroupTitleStyle,
148683 from: dataRef,
148684 encode
148685 }, userEncode);
148686}
148687function buildSubTitle(spec, _, userEncode, dataRef) {
148688 const zero2 = {
148689 value: 0

Callers 1

parseTitleFunction · 0.70

Calls 3

addEncodersFunction · 0.70
_Function · 0.70
guideMarkFunction · 0.70

Tested by

no test coverage detected