fix(carlita): Apply expand to inherited parts
This commit is contained in:
parent
c9b2f08c0a
commit
34042bb6ca
2 changed files with 40 additions and 1 deletions
|
@ -3,7 +3,26 @@ import { frontFacing as carltonFrontFacing } from '@freesewing/carlton'
|
||||||
export const frontFacing = {
|
export const frontFacing = {
|
||||||
name: 'carlita.frontFacing',
|
name: 'carlita.frontFacing',
|
||||||
from: carltonFrontFacing,
|
from: carltonFrontFacing,
|
||||||
draft: ({ points, macro, part }) => {
|
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', {
|
macro('title', {
|
||||||
at: points.title,
|
at: points.title,
|
||||||
nr: '1c',
|
nr: '1c',
|
||||||
|
|
|
@ -7,10 +7,30 @@ function draftCarlitaFrontLining({
|
||||||
store,
|
store,
|
||||||
points,
|
points,
|
||||||
macro,
|
macro,
|
||||||
|
expand,
|
||||||
paths,
|
paths,
|
||||||
Path,
|
Path,
|
||||||
part,
|
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:cutFrontLining`,
|
||||||
|
suggest: {
|
||||||
|
text: 'flag:show',
|
||||||
|
icon: 'expand',
|
||||||
|
update: {
|
||||||
|
settings: ['expand', 1],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
// Also hint about expand
|
||||||
|
store.flag.preset('expandIsOff')
|
||||||
|
|
||||||
|
return part.hide()
|
||||||
|
}
|
||||||
|
|
||||||
const collar = paths.frontCollar.split(points.flbTop)
|
const collar = paths.frontCollar.split(points.flbTop)
|
||||||
const armhole = paths.frontArmhole
|
const armhole = paths.frontArmhole
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue