Skip to content

Commit

Permalink
refactor: rename exprFromValueRefOrSignalRef
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Sep 7, 2021
1 parent a589d18 commit abdb27b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/compile/axis/assemble.ts
Expand Up @@ -7,7 +7,7 @@ import {Config} from '../../config';
import {isText} from '../../title';
import {contains, getFirstDefined, isEmpty, replaceAll} from '../../util';
import {isSignalRef, VgEncodeChannel, VgValueRef} from '../../vega.schema';
import {exprFromValueOrSignalRef} from '../common';
import {exprFromValueRefOrSignalRef} from '../common';
import {Model} from '../model';
import {expression} from '../predicate';
import {AxisComponent, AxisComponentIndex} from './component';
Expand Down Expand Up @@ -87,9 +87,9 @@ export function assembleAxis(
conditions
.map(c => {
const {test, ...valueOrSignalCRef} = c;
return `${expression(null, test)} ? ${exprFromValueOrSignalRef(valueOrSignalCRef)} : `;
return `${expression(null, test)} ? ${exprFromValueRefOrSignalRef(valueOrSignalCRef)} : `;
})
.join('') + exprFromValueOrSignalRef(valueOrSignalRef)
.join('') + exprFromValueRefOrSignalRef(valueOrSignalRef)
};
axis[prop] = signalRef;
}
Expand Down
3 changes: 2 additions & 1 deletion src/compile/common.ts
Expand Up @@ -67,7 +67,8 @@ export function signalOrValueRef<T>(value: T | SignalRef | ExprRef): {value: T}
return value !== undefined ? {value} : undefined;
}

export function exprFromValueOrSignalRef(ref: VgValueRef | SignalRef): string {

export function exprFromValueRefOrSignalRef(ref: VgValueRef | SignalRef): string {
if (isSignalRef(ref)) {
return ref.signal;
}
Expand Down

0 comments on commit abdb27b

Please sign in to comment.