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