1
0
Fork 0
freesewing/designs/carlita/src/front-facing.mjs

40 lines
871 B
JavaScript
Raw Normal View History

2023-09-16 10:32:55 +02:00
import { frontFacing as carltonFrontFacing } from '@freesewing/carlton'
export const frontFacing = {
name: 'carlita.frontFacing',
from: carltonFrontFacing,
draft: ({ points, macro, expand, store, part }) => {
if (expand) store.flag.preset('expandIsOn')
else {
// Expand is on, do not draw the part but flag this to the user
store.flag.note({
msg: `carlton:cutFrontFacing`,
suggest: {
text: 'flag:show',
icon: 'expand',
update: {
settings: ['expand', 1],
},
},
})
// Also hint about expand
store.flag.preset('expandIsOff')
return part.hide()
}
macro('title', {
at: points.title,
nr: '1c',
title: 'frontFacing',
align: 'center',
})
return part
},
2023-09-16 10:32:55 +02:00
hide: {
from: true,
inherited: true,
},
}