점선그리드 수정
This commit is contained in:
parent
6d152e7d22
commit
938ad30feb
@ -34,6 +34,7 @@ export default function DotLineGrid(props) {
|
||||
// 데이터를 최초 한 번만 조회
|
||||
useEffect(() => {
|
||||
console.log('DotLineGrid useEffect 실행')
|
||||
|
||||
setSettingsDataSave({ ...settingsData })
|
||||
|
||||
// dimension 값에 맞는 옵션을 선택
|
||||
@ -137,6 +138,7 @@ export default function DotLineGrid(props) {
|
||||
|
||||
const changeDimension = (result) => {
|
||||
const { value } = result
|
||||
setSelectOption(result)
|
||||
setCopyCurrentSetting((prev) => {
|
||||
return {
|
||||
...prev,
|
||||
@ -268,14 +270,16 @@ export default function DotLineGrid(props) {
|
||||
<span>mm</span>
|
||||
</div>
|
||||
<div className="grid-select">
|
||||
<QSelectBox
|
||||
options={SelectOptions}
|
||||
onChange={changeDimension}
|
||||
value={selectOption}
|
||||
showKey={'name'}
|
||||
targetKey={'id'}
|
||||
sourceKey={'id'}
|
||||
/>
|
||||
{selectOption && (
|
||||
<QSelectBox
|
||||
options={SelectOptions}
|
||||
onChange={changeDimension}
|
||||
value={selectOption}
|
||||
showKey={'name'}
|
||||
targetKey={'id'}
|
||||
sourceKey={'id'}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -15,12 +15,13 @@ export function useGrid() {
|
||||
if (!canvas) {
|
||||
return
|
||||
}
|
||||
|
||||
const patternData = {
|
||||
dotGridDisplay: dotLineGridSetting.DOT,
|
||||
lineGridDisplay: dotLineGridSetting.LINE,
|
||||
gridType: dotLineGridSetting.INTERVAL.type,
|
||||
gridHorizon: dotLineGridSetting.INTERVAL.horizontalInterval / 10,
|
||||
gridVertical: dotLineGridSetting.INTERVAL.verticalInterval / 10,
|
||||
gridHorizon: (dotLineGridSetting.INTERVAL.horizontalInterval / 10) * (dotLineGridSetting.INTERVAL.dimension ?? 1),
|
||||
gridVertical: (dotLineGridSetting.INTERVAL.verticalInterval / 10) * (dotLineGridSetting.INTERVAL.dimension ?? 1),
|
||||
gridRatio: dotLineGridSetting.INTERVAL.ratioInterval / 10,
|
||||
gridDimen: dotLineGridSetting.INTERVAL.dimension,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user