방향키 이벤트 수정, offset Arc default값 0으로 수정
This commit is contained in:
parent
4c76449789
commit
1b080eba55
@ -353,8 +353,8 @@ export function useCanvas(id) {
|
||||
|
||||
let top = targetObj.top + 10
|
||||
|
||||
if (top > CANVAS.HEIGHT) {
|
||||
top = CANVAS.HEIGHT
|
||||
if (top > canvasSize.vertical) {
|
||||
top = canvasSize.vertical
|
||||
}
|
||||
|
||||
targetObj.set({ top: top })
|
||||
@ -401,8 +401,8 @@ export function useCanvas(id) {
|
||||
|
||||
let left = targetObj.left + 10
|
||||
|
||||
if (left > CANVAS.WIDTH) {
|
||||
left = CANVAS.WIDTH
|
||||
if (left > canvasSize.horizontal) {
|
||||
left = canvasSize.horizontal
|
||||
}
|
||||
|
||||
targetObj.set({ left: left })
|
||||
|
||||
@ -333,6 +333,9 @@ export function useMode() {
|
||||
}
|
||||
|
||||
const handleKeyDown = (e) => {
|
||||
if (mode !== Mode.EDIT) {
|
||||
return
|
||||
}
|
||||
switch (e.key) {
|
||||
case 'ArrowDown': {
|
||||
if (!keyValid()) {
|
||||
@ -3373,7 +3376,7 @@ export function useMode() {
|
||||
return acc.length > cur.length ? acc : cur
|
||||
})
|
||||
|
||||
const offsetPolygonPoint = offsetPolygon(roof.points, -20, 0)
|
||||
const offsetPolygonPoint = offsetPolygon(roof.points, -20)
|
||||
|
||||
const trestlePoly = new QPolygon(offsetPolygonPoint, {
|
||||
fill: 'transparent',
|
||||
|
||||
@ -928,8 +928,9 @@ function createPaddingPolygon(polygon, offset, arcSegments = 0) {
|
||||
return paddingPolygon
|
||||
}
|
||||
|
||||
export default function offsetPolygon(vertices, offset, arcSegments = 0) {
|
||||
export default function offsetPolygon(vertices, offset) {
|
||||
const polygon = createPolygon(vertices)
|
||||
const arcSegments = 0
|
||||
|
||||
const originPolygon = new QPolygon(vertices, { fontSize: 0 })
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user