기본 캔버스 사이즈 수정
This commit is contained in:
parent
84e95a29df
commit
5814c48b9a
@ -234,7 +234,7 @@ export default function Roof2() {
|
|||||||
<div className="flex justify-center flex-col items-center">
|
<div className="flex justify-center flex-col items-center">
|
||||||
<div className="m-2 p-2 w-80">
|
<div className="m-2 p-2 w-80">
|
||||||
<RangeSlider
|
<RangeSlider
|
||||||
title="canvas 가로 사이즈"
|
title={`canvas 가로 사이즈${horizontalSize}`}
|
||||||
initValue={horizontalSize}
|
initValue={horizontalSize}
|
||||||
min="500"
|
min="500"
|
||||||
step="100"
|
step="100"
|
||||||
@ -244,7 +244,7 @@ export default function Roof2() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="m-2 p-2 w-80">
|
<div className="m-2 p-2 w-80">
|
||||||
<RangeSlider
|
<RangeSlider
|
||||||
title="canvas 세로 사이즈"
|
title={`canvas 세로 사이즈${verticalSize}`}
|
||||||
initValue={verticalSize}
|
initValue={verticalSize}
|
||||||
min="500"
|
min="500"
|
||||||
step="100"
|
step="100"
|
||||||
|
|||||||
@ -61,6 +61,7 @@ export default class QPolygon extends fabric.Polygon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#addLengthText() {
|
#addLengthText() {
|
||||||
|
return false
|
||||||
if (this.#text.length > 0) {
|
if (this.#text.length > 0) {
|
||||||
this.#text.forEach((text) => {
|
this.#text.forEach((text) => {
|
||||||
this.canvas.remove(text)
|
this.canvas.remove(text)
|
||||||
@ -235,4 +236,8 @@ export default class QPolygon extends fabric.Polygon {
|
|||||||
|
|
||||||
return intersects % 2 === 1
|
return intersects % 2 === 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCurrentOptions = () => {
|
||||||
|
return this.options
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ export function useCanvas(id) {
|
|||||||
?.getObjects()
|
?.getObjects()
|
||||||
.filter(
|
.filter(
|
||||||
(obj) =>
|
(obj) =>
|
||||||
obj.type === 'Qline' ||
|
obj.type === 'QLine' ||
|
||||||
obj.type === 'QPolygon' ||
|
obj.type === 'QPolygon' ||
|
||||||
obj.type === 'QRect',
|
obj.type === 'QRect',
|
||||||
)
|
)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export const fontSizeState = atom({
|
|||||||
export const canvasSizeState = atom({
|
export const canvasSizeState = atom({
|
||||||
key: 'canvasSize',
|
key: 'canvasSize',
|
||||||
default: {
|
default: {
|
||||||
vertical: 500,
|
vertical: 1000,
|
||||||
horizontal : 500
|
horizontal: 1000,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user