chore(shared): Added expand to workbench
This commit is contained in:
parent
55ee707bf1
commit
24851967ef
7 changed files with 42 additions and 0 deletions
|
@ -282,6 +282,12 @@ export const EmailIcon = (props) => (
|
|||
</IconWrapper>
|
||||
)
|
||||
|
||||
export const ExpandIcon = (props) => (
|
||||
<IconWrapper {...props}>
|
||||
<path d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" />
|
||||
</IconWrapper>
|
||||
)
|
||||
|
||||
export const ExportIcon = (props) => (
|
||||
<IconWrapper {...props}>
|
||||
<path d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
||||
|
|
|
@ -27,6 +27,7 @@ export const defaultGist = {
|
|||
margin: 2,
|
||||
renderer: 'react',
|
||||
embed: true,
|
||||
expand: false,
|
||||
}
|
||||
|
||||
export const preloadGist = {
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
DetailIcon,
|
||||
IncludeIcon,
|
||||
MarginIcon,
|
||||
ExpandIcon,
|
||||
} from 'shared/components/icons.mjs'
|
||||
|
||||
export const defaultSamm = (units, inMm = true) => {
|
||||
|
@ -106,6 +107,20 @@ export const loadSettingsConfig = ({
|
|||
},
|
||||
icon: DetailIcon,
|
||||
},
|
||||
expand: {
|
||||
control: 4, // Show when control > 3
|
||||
list: [0, 1],
|
||||
dflt: 0,
|
||||
choiceTitles: {
|
||||
0: 'expandNo',
|
||||
1: 'expandYes',
|
||||
},
|
||||
valueTitles: {
|
||||
0: 'no',
|
||||
1: 'yes',
|
||||
},
|
||||
icon: ExpandIcon,
|
||||
},
|
||||
only: {
|
||||
control: 4, // Show when control > 3
|
||||
dflt: false,
|
||||
|
|
|
@ -9,6 +9,8 @@ sabool.t: Include Seam Allowance
|
|||
sabool.d: Controls whether or not to include seam allowance in your pattern
|
||||
complete.t: Details
|
||||
complete.d: Controls how detailed the pattern is; Either a complete pattern with all details, or a basic outline of the pattern parts
|
||||
expand.t: Expand
|
||||
expand.d: Controls efforts to save paper. Disable this to expand all pattern parts at the cost of using more space.
|
||||
only.t: Included Parts
|
||||
only.d: Use this to control exactly which pattern parts will be included in your pattern
|
||||
locale.t: Language
|
||||
|
@ -35,6 +37,10 @@ completeYes.t: Generate a complete pattern
|
|||
completeYes.d: This will generate a complete pattern with all notations, lines, markings. Use this if you are not certain what to choose.
|
||||
completeNo.t: Generate a pattern outline
|
||||
completeNo.d: Only generate the outline of the pattern parts. Use this if you are looking to use a lasercutter or have other specific needs.
|
||||
expandYes.t: Expand all pattern parts
|
||||
expandYes.d: This will generate a pattern where all pattern parts are drawn to their full size, even if they are simple rectangles.
|
||||
expandNo.t: Keep patterns parts compact where possible
|
||||
expandNo.d: This will draw a more dense representation of the pattern which includes all info without using up too much space & paper.
|
||||
paperlessNo.t: Generate a regular pattern
|
||||
paperlessNo.d: This will generate a regular pattern, which you can then print out.
|
||||
paperlessYes.t: Generate a paperless pattern
|
||||
|
|
|
@ -13,6 +13,7 @@ const OnlySettingInput = (props) => {
|
|||
|
||||
export const inputs = {
|
||||
complete: ListInput,
|
||||
expand: ListInput,
|
||||
locale: ListInput,
|
||||
margin: MmInput,
|
||||
only: OnlySettingInput,
|
||||
|
|
|
@ -14,6 +14,7 @@ const OnlySettingValue = ({ current, config }) => (
|
|||
|
||||
export const values = {
|
||||
complete: ListValue,
|
||||
expand: ListValue,
|
||||
locale: ListValue,
|
||||
margin: MmValue,
|
||||
only: OnlySettingValue,
|
||||
|
|
|
@ -21,6 +21,7 @@ import {
|
|||
BookmarkIcon,
|
||||
ZoomInIcon,
|
||||
ZoomOutIcon,
|
||||
ExpandIcon,
|
||||
} from 'shared/components/icons.mjs'
|
||||
import { shownHeaderSelector } from 'shared/components/wrappers/header.mjs'
|
||||
|
||||
|
@ -158,6 +159,17 @@ export const ViewHeader = ({ update, settings, ui, control, account, design, set
|
|||
}
|
||||
title={t('core-settings:complete.t')}
|
||||
/>
|
||||
<IconButton
|
||||
Icon={ExpandIcon}
|
||||
dflt={settings.expand}
|
||||
onClick={() =>
|
||||
update.settings(
|
||||
['expand'],
|
||||
typeof settings.expand === 'undefined' ? 1 : settings.expand ? 0 : 1
|
||||
)
|
||||
}
|
||||
title={t('core-settings:expand.t')}
|
||||
/>
|
||||
<IconButton
|
||||
Icon={
|
||||
settings.units !== 'imperial'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue