|
|
@@ -496,7 +496,8 @@ export class CanvasPhotoEditor {
|
|
|
x: this.indexingStartX,
|
|
|
y: startInfo.itemIndex > PhotoIndex.itemIndex ? (coordinate.y + coordinate.height + 3) : coordinate.y -3,
|
|
|
}
|
|
|
- if(startInfo.count == 2 && startInfo.count == PhotoIndex.count && startInfo.itemIndex == PhotoIndex.itemIndex){
|
|
|
+ let ceY = PhotoIndex.itemIndex == 0?(mouseY - coordinate.y):(coordinate.y + coordinate.height -mouseY)
|
|
|
+ if(startInfo.count == 2 && startInfo.count == PhotoIndex.count && startInfo.itemIndex == PhotoIndex.itemIndex && (mouseX-coordinate.x)>ceY){
|
|
|
endIindexing1 = {//同item页面 同数量
|
|
|
x: mouseX,
|
|
|
y: PhotoIndex.itemIndex == 0?coordinate.y:(coordinate.y+coordinate.height),
|
|
|
@@ -522,7 +523,6 @@ export class CanvasPhotoEditor {
|
|
|
let newX = addPage*(this.pageWidth + this.pageMargin)
|
|
|
points.splice(1, 0, { x: newX, y: this.indexingStartY }, { x: newX, y: endIindexing1.y })
|
|
|
}
|
|
|
- let ceY = PhotoIndex.itemIndex == 0?(mouseY - coordinate.y):(coordinate.y + coordinate.height -mouseY)
|
|
|
if(startInfo.count == PhotoIndex.count && startInfo.itemIndex == PhotoIndex.itemIndex && (mouseX-coordinate.x)>ceY){//同数量 同item
|
|
|
console.log(startInfo, endIindexing1, coordinate,'坐标',mouseX,mouseY)
|
|
|
let newY = PhotoIndex.itemIndex == 0 ? (coordinate.y - 30) : (coordinate.y + coordinate.height + 80)
|
|
|
@@ -637,9 +637,9 @@ export class CanvasPhotoEditor {
|
|
|
// 绘制T边
|
|
|
let startInfo = indexingList[0]
|
|
|
let endInfo = indexingList[1]
|
|
|
- console.log('drawGuideLine', indexingList)
|
|
|
+ console.log('drawGuideLine', indexingList, points)
|
|
|
ctx.beginPath();
|
|
|
- if (startInfo.count == endInfo.count && startInfo.count == 2 && startInfo.itemIndex == endInfo.itemIndex) {
|
|
|
+ if (startInfo.count == endInfo.count && startInfo.count == 2 && startInfo.itemIndex == endInfo.itemIndex && points.length == 4 ) {
|
|
|
ctx.moveTo(coordinate.x, last.y);
|
|
|
ctx.lineTo((coordinate.x + coordinate.width), last.y);
|
|
|
} else if (startInfo.pageIndex == endInfo.pageIndex) {//判断上下就行
|