drag zoom bugfix
This commit is contained in:
@@ -358,7 +358,7 @@ function doHandleCrosshairMovement(point) {
|
|||||||
}
|
}
|
||||||
const points = structuredClone(shape.getPoints());
|
const points = structuredClone(shape.getPoints());
|
||||||
const lpbe = shape._model._linePointBeingEdited
|
const lpbe = shape._model._linePointBeingEdited
|
||||||
points[lpbe] = point
|
points[lpbe===null?0:lpbe] = point
|
||||||
// console.log('calling onDrag', points, shape)
|
// console.log('calling onDrag', points, shape)
|
||||||
invokeCallbacks(shapeCallbacks[shapeId], 'onDrag', shapeId, shape, points)
|
invokeCallbacks(shapeCallbacks[shapeId], 'onDrag', shapeId, shape, points)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ function translateOnModel(shape) {
|
|||||||
const prev = getModelValue(oldModel)
|
const prev = getModelValue(oldModel)
|
||||||
const cur = vectorize(getModelValue(model))
|
const cur = vectorize(getModelValue(model))
|
||||||
const delta = vectorSub(cur, prev)
|
const delta = vectorSub(cur, prev)
|
||||||
// console.log('delta', shape.id, prev, cur, delta)
|
// console.log('translateOnModel delta', shape.id, prev, cur, delta)
|
||||||
let [a, b] = endpoints.value
|
let [a, b] = endpoints.value
|
||||||
a = vectorize(a)
|
a = vectorize(a)
|
||||||
if (!vectorIsZero(delta)) {
|
if (!vectorIsZero(delta)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user