zydx-plus 1.33.324 → 1.33.326
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -539,7 +539,7 @@ export default {
|
|
|
539
539
|
},
|
|
540
540
|
del(index) {
|
|
541
541
|
let that = this
|
|
542
|
-
that.data.html = html2json(that.editor.getHTML()).child
|
|
542
|
+
// that.data.html = html2json(that.editor.getHTML()).child
|
|
543
543
|
if (this.uploadAttData[index].name === undefined) {
|
|
544
544
|
that.uploadAttData[index].active = false
|
|
545
545
|
that.$emit('del', that.uploadAttData[index], (e) => {
|
|
@@ -385,11 +385,13 @@ export default {
|
|
|
385
385
|
const y2 = this.points[i+1]?this.points[i+1].y*this.scales/this.points[i].scale:0
|
|
386
386
|
const x3 = obj.x
|
|
387
387
|
const y3 = obj.y
|
|
388
|
-
const a = Math.abs((x1-x2)*(y1-y3)-(x1-x3)*(y1-y2))
|
|
389
|
-
const b = Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2))
|
|
388
|
+
// const a = Math.abs((x1-x2)*(y1-y3)-(x1-x3)*(y1-y2))
|
|
389
|
+
// const b = Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2))
|
|
390
390
|
const c = Math.sqrt(Math.pow(x1-x3,2)+Math.pow(y1-y3,2))
|
|
391
391
|
const d = Math.sqrt(Math.pow(x2-x3,2)+Math.pow(y2-y3,2))
|
|
392
|
-
|
|
392
|
+
const scope = this.lineWidth/2+15
|
|
393
|
+
// if(a/b <= 5 && c <= b && d <= b) {
|
|
394
|
+
if(c<scope&&d<scope&&this.points[i].id===this.points[i+1].id) {
|
|
393
395
|
const id = this.points[i].id
|
|
394
396
|
for(let j=0; j<this.points.length; j++) {
|
|
395
397
|
if(this.points[j].id === id) {
|
|
@@ -399,6 +401,7 @@ export default {
|
|
|
399
401
|
j--
|
|
400
402
|
}
|
|
401
403
|
}
|
|
404
|
+
return
|
|
402
405
|
}
|
|
403
406
|
}
|
|
404
407
|
// 判断点击的是否是箭头
|
|
@@ -993,7 +996,6 @@ export default {
|
|
|
993
996
|
}
|
|
994
997
|
},
|
|
995
998
|
flipRight(e, v) {
|
|
996
|
-
console.log(e)
|
|
997
999
|
if (e < 1) {
|
|
998
1000
|
this.pageIndex = 1
|
|
999
1001
|
return
|
|
@@ -1046,16 +1048,16 @@ export default {
|
|
|
1046
1048
|
canvas.height = hei * that.sratio
|
|
1047
1049
|
canvas.style.width = wid + 'px'
|
|
1048
1050
|
canvas.style.height = hei + 'px'
|
|
1049
|
-
canvas2.width =
|
|
1050
|
-
canvas2.height =
|
|
1051
|
+
canvas2.width = wid * that.sratio
|
|
1052
|
+
canvas2.height = hei * that.sratio
|
|
1051
1053
|
canvas2.style.width = wid + 'px'
|
|
1052
1054
|
canvas2.style.height = hei + 'px'
|
|
1053
1055
|
that.canvasStyle = {
|
|
1054
|
-
width:
|
|
1055
|
-
height:
|
|
1056
|
-
marginLeft: -(
|
|
1057
|
-
widthCanvas:
|
|
1058
|
-
heightCanvas:
|
|
1056
|
+
width: wid + 'px',
|
|
1057
|
+
height: hei + 'px',
|
|
1058
|
+
marginLeft: -(wid / 2) + 'px',
|
|
1059
|
+
widthCanvas: wid * that.sratio,
|
|
1060
|
+
heightCanvas: hei * that.sratio
|
|
1059
1061
|
}
|
|
1060
1062
|
let renderContext = {
|
|
1061
1063
|
canvasContext: ctx2,
|