dev #582

Merged
qcast3 merged 4 commits from dev into dev-deploy 2026-01-15 18:33:59 +09:00
Showing only changes of commit c501896f59 - Show all commits

View File

@ -10,7 +10,7 @@ import {
} from '@/store/canvasAtom'
import { QLine } from '@/components/fabric/QLine'
import { basicSettingState } from '@/store/settingAtom'
import { calcLineActualSizeByLineLength } from '@/util/qpolygon-utils'
import { calcLineActualSizeByLineLength, calcLinePlaneSize } from '@/util/qpolygon-utils'
import { getDegreeByChon } from '@/util/canvas-util'
import { useText } from '@/hooks/useText'
import { fontSelector } from '@/store/fontAtom'
@ -31,6 +31,7 @@ export const useLine = () => {
const addLine = (points = [], options) => {
const line = new QLine(points, {
...options,
attributes: {},
fontSize: lengthText.fontSize.value,
fontFamily: lengthText.fontFamily.value,
})
@ -38,7 +39,7 @@ export const useLine = () => {
if (line.length < 1) {
return null
}
line.attributes.planeSize = calcLinePlaneSize(line)
canvas?.add(line)
return line
}