MCPcopy Create free account
hub / github.com/microsoft/SandDance / textSignals

Function textSignals

packages/sanddance-specs/src/signals.ts:9–86  ·  view source on GitHub ↗
(context: SpecContext, heightSignal: string)

Source from the content-addressed store, hash-verified

7export const defaultZProportion = 0.6;
8
9export function textSignals(context: SpecContext, heightSignal: string) {
10 const { specViewOptions } = context;
11 const signals: NewSignal[] = [
12 {
13 name: SignalNames.ZProportion,
14 value: defaultZProportion,
15 bind: {
16 name: specViewOptions.language.zScaleProportion,
17 debounce: 50,
18 input: 'range',
19 min: 0.2,
20 max: 2,
21 step: 0.1,
22 },
23 },
24 {
25 name: SignalNames.ZHeight,
26 update: `${heightSignal} * ${SignalNames.ZProportion}`,
27 },
28 {
29 name: SignalNames.TextScale,
30 value: 1.2,
31 bind: {
32 name: specViewOptions.language.textScaleSignal,
33 debounce: 50,
34 input: 'range',
35 min: 0.5,
36 max: 2,
37 step: 0.1,
38 },
39 },
40 {
41 name: SignalNames.TextSize,
42 update: `${SignalNames.TextScale} * 10`,
43 },
44 {
45 name: SignalNames.TextTitleSize,
46 update: `${SignalNames.TextScale} * 15`,
47 },
48 {
49 name: SignalNames.TextAngleX,
50 value: 30,
51 bind: {
52 name: specViewOptions.language.xAxisTextAngleSignal,
53 debounce: 50,
54 input: 'range',
55 min: 0,
56 max: 90,
57 step: 1,
58 },
59 },
60 {
61 name: SignalNames.TextAngleY,
62 value: 0,
63 bind: {
64 name: specViewOptions.language.yAxisTextAngleSignal,
65 debounce: 50,
66 input: 'range',

Callers 1

initSpecMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected