|
@@ -299,7 +299,6 @@ export class CanvasPhotoEditor {
|
|
|
const rect = this.canvas.getBoundingClientRect()
|
|
const rect = this.canvas.getBoundingClientRect()
|
|
|
const mouseX = (e.clientX - rect.left - this.drawOffsetX) / this.scale
|
|
const mouseX = (e.clientX - rect.left - this.drawOffsetX) / this.scale
|
|
|
const mouseY = (e.clientY - rect.top - this.drawOffsetY) / this.scale
|
|
const mouseY = (e.clientY - rect.top - this.drawOffsetY) / this.scale
|
|
|
- console.log('pageIndex', this.dragPageData.movedIndex, this.indexingLineList.length)
|
|
|
|
|
// if (this.dragPageData.drawing && this.indexingLineList.length) {
|
|
// if (this.dragPageData.drawing && this.indexingLineList.length) {
|
|
|
// let check = await this.clearLineThrottle()
|
|
// let check = await this.clearLineThrottle()
|
|
|
// console.log('pageIndexcheck', check)
|
|
// console.log('pageIndexcheck', check)
|
|
@@ -307,7 +306,6 @@ export class CanvasPhotoEditor {
|
|
|
// }
|
|
// }
|
|
|
if (this.indexing && drawing) {
|
|
if (this.indexing && drawing) {
|
|
|
const PhotoIndex = this.getPhotoPositionInPage(e)
|
|
const PhotoIndex = this.getPhotoPositionInPage(e)
|
|
|
- console.log('PhotoIndex', PhotoIndex, this.tempArrow)
|
|
|
|
|
this.tempArrow.end = { ...PhotoIndex, x: mouseX, y: mouseY }
|
|
this.tempArrow.end = { ...PhotoIndex, x: mouseX, y: mouseY }
|
|
|
this.drawAllPages()
|
|
this.drawAllPages()
|
|
|
return
|
|
return
|
|
@@ -348,8 +346,11 @@ export class CanvasPhotoEditor {
|
|
|
this.canvas.style.cursor = 'grab'
|
|
this.canvas.style.cursor = 'grab'
|
|
|
if (this.dragPageData.drawing && this.dragPageData.index != this.dragPageData.movedIndex) {//鼠标释放左键时,移动页面到指定位置)
|
|
if (this.dragPageData.drawing && this.dragPageData.index != this.dragPageData.movedIndex) {//鼠标释放左键时,移动页面到指定位置)
|
|
|
// 末尾必须加分号!!!
|
|
// 末尾必须加分号!!!
|
|
|
|
|
+ const index = this.dragPageData.index
|
|
|
|
|
+ const movedIndex = this.dragPageData.movedIndex
|
|
|
|
|
+
|
|
|
let check = await this.checkIndexing('修改页面排序将会清除所有标引是否继续?')
|
|
let check = await this.checkIndexing('修改页面排序将会清除所有标引是否继续?')
|
|
|
- let newPagelist = this.moveItem(this.pages, this.dragPageData.index, this.dragPageData.movedIndex)
|
|
|
|
|
|
|
+ let newPagelist = this.moveItem(this.pages, index, movedIndex)
|
|
|
this.pages = newPagelist;
|
|
this.pages = newPagelist;
|
|
|
this.dragPageData.drawing = false//退出page编辑模式
|
|
this.dragPageData.drawing = false//退出page编辑模式
|
|
|
this.dragPageData.movedIndex = -1
|
|
this.dragPageData.movedIndex = -1
|
|
@@ -1907,7 +1908,6 @@ export class CanvasPhotoEditor {
|
|
|
if(this.dragPageData.drawing && newList.length){
|
|
if(this.dragPageData.drawing && newList.length){
|
|
|
this.dragPageData.drawing = false;
|
|
this.dragPageData.drawing = false;
|
|
|
}
|
|
}
|
|
|
- console.log(this.indexingLineList,'this.indexingLineList', newList, selectIndexPage, this.selectedPageIndex, this.dragPageData)
|
|
|
|
|
let length = this.selectedPageIndex==-1?this.indexingLineList.length:newList.length;
|
|
let length = this.selectedPageIndex==-1?this.indexingLineList.length:newList.length;
|
|
|
// try {
|
|
// try {
|
|
|
if (length && await ElMessageBox.confirm(mes, '提示')) {
|
|
if (length && await ElMessageBox.confirm(mes, '提示')) {
|