Style fix: skip % when creating new line calls
The unlabeled arg is automatically set to % anyway.
This commit is contained in:
committed by
Nick Cameron
parent
3cecb99aa1
commit
91df6b9511
@ -593,7 +593,7 @@ test.describe('Sketch tests', () => {
|
|||||||
|
|
||||||
await expect(page.getByTestId('segment-overlay')).toHaveCount(2)
|
await expect(page.getByTestId('segment-overlay')).toHaveCount(2)
|
||||||
|
|
||||||
// drag startProfieAt handle
|
// drag startProfileAt handle
|
||||||
await page.mouse.move(startPX[0], startPX[1])
|
await page.mouse.move(startPX[0], startPX[1])
|
||||||
await page.mouse.down()
|
await page.mouse.down()
|
||||||
await page.mouse.move(startPX[0] + dragPX, startPX[1] - dragPX, step5)
|
await page.mouse.move(startPX[0] + dragPX, startPX[1] - dragPX, step5)
|
||||||
|
|||||||
@ -389,7 +389,7 @@ export const line: SketchLineHelperKw = {
|
|||||||
) {
|
) {
|
||||||
const callExp = createCallExpressionStdLibKw(
|
const callExp = createCallExpressionStdLibKw(
|
||||||
'line',
|
'line',
|
||||||
createPipeSubstitution(),
|
null, // Assumes this is being called in a pipeline, so the first arg is optional and if not given, will become pipeline substitution.
|
||||||
// TODO: ADAM: This should have a tag sometimes.
|
// TODO: ADAM: This should have a tag sometimes.
|
||||||
[createLabeledArg(ARG_END, createArrayExpression([newXVal, newYVal]))]
|
[createLabeledArg(ARG_END, createArrayExpression([newXVal, newYVal]))]
|
||||||
)
|
)
|
||||||
@ -439,7 +439,7 @@ export const line: SketchLineHelperKw = {
|
|||||||
|
|
||||||
const callExp = createCallExpressionStdLibKw(
|
const callExp = createCallExpressionStdLibKw(
|
||||||
'line',
|
'line',
|
||||||
createPipeSubstitution(),
|
null, // Assumes this is being called in a pipeline, so the first arg is optional and if not given, will become pipeline substitution.
|
||||||
[createLabeledArg(ARG_END, createArrayExpression([newXVal, newYVal]))]
|
[createLabeledArg(ARG_END, createArrayExpression([newXVal, newYVal]))]
|
||||||
)
|
)
|
||||||
if (pipe.type === 'PipeExpression') {
|
if (pipe.type === 'PipeExpression') {
|
||||||
@ -473,7 +473,7 @@ export const line: SketchLineHelperKw = {
|
|||||||
createLiteral(roundOff(to[1] - from[1], 2)),
|
createLiteral(roundOff(to[1] - from[1], 2)),
|
||||||
])
|
])
|
||||||
|
|
||||||
mutateKwArg('end', callExpression, toArrExp)
|
mutateKwArg(ARG_END, callExpression, toArrExp)
|
||||||
return {
|
return {
|
||||||
modifiedAst: _node,
|
modifiedAst: _node,
|
||||||
pathToNode,
|
pathToNode,
|
||||||
@ -528,7 +528,7 @@ export const lineTo: SketchLineHelperKw = {
|
|||||||
) {
|
) {
|
||||||
const callExp = createCallExpressionStdLibKw(
|
const callExp = createCallExpressionStdLibKw(
|
||||||
'line',
|
'line',
|
||||||
createPipeSubstitution(),
|
null, // Assumes this is being called in a pipeline, so the first arg is optional and if not given, will become pipeline substitution.
|
||||||
[
|
[
|
||||||
createLabeledArg(
|
createLabeledArg(
|
||||||
ARG_END_ABSOLUTE,
|
ARG_END_ABSOLUTE,
|
||||||
@ -582,7 +582,7 @@ export const lineTo: SketchLineHelperKw = {
|
|||||||
|
|
||||||
const callExp = createCallExpressionStdLibKw(
|
const callExp = createCallExpressionStdLibKw(
|
||||||
'line',
|
'line',
|
||||||
createPipeSubstitution(),
|
null, // Assumes this is being called in a pipeline, so the first arg is optional and if not given, will become pipeline substitution.
|
||||||
[
|
[
|
||||||
createLabeledArg(
|
createLabeledArg(
|
||||||
ARG_END_ABSOLUTE,
|
ARG_END_ABSOLUTE,
|
||||||
|
|||||||
Reference in New Issue
Block a user