2023-09-16 10:32:55 +02:00
|
|
|
import { frontFacing as carltonFrontFacing } from '@freesewing/carlton'
|
|
|
|
|
|
|
|
export const frontFacing = {
|
|
|
|
name: 'carlita.frontFacing',
|
|
|
|
from: carltonFrontFacing,
|
2023-09-16 16:50:17 +02:00
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
2023-09-16 10:58:28 +02:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
}
|