zydx-plus 1.35.547 → 1.35.549
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 +1 -1
- package/src/components/dragPopup/src/dragPopup.vue +12 -6
- package/src/components/dragPopup2/src/dragPopup.vue +12 -6
- package/src/components/flip/src/flip.vue +20 -6
- package/src/components/sketchpad/src/sketchpad.vue +15 -9
- package/src/components/tagging/src/tagging.css +2 -1
- package/src/components/tagging/src/tagging.vue +4 -4
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -412,6 +412,12 @@ export default {
|
|
|
412
412
|
this.y = window.innerHeight / 2 - this.height / 2;
|
|
413
413
|
this.footDownOffset = this.height;
|
|
414
414
|
this.footRightOffset = this.width;
|
|
415
|
+
this.$emit('updateDrag', {
|
|
416
|
+
width: this.footRightOffset,
|
|
417
|
+
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
418
|
+
left: this.x,
|
|
419
|
+
top: this.y
|
|
420
|
+
})
|
|
415
421
|
}else {
|
|
416
422
|
this.fullScreen()
|
|
417
423
|
setTimeout(() => {
|
|
@@ -419,14 +425,14 @@ export default {
|
|
|
419
425
|
this.y = 0;
|
|
420
426
|
this.footDownOffset = window.outerHeight + 20;
|
|
421
427
|
this.footRightOffset = window.outerWidth + 20;
|
|
428
|
+
this.$emit('updateDrag', {
|
|
429
|
+
width: this.footRightOffset,
|
|
430
|
+
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
431
|
+
left: this.x,
|
|
432
|
+
top: this.y
|
|
433
|
+
})
|
|
422
434
|
},100)
|
|
423
435
|
}
|
|
424
|
-
this.$emit('updateDrag', {
|
|
425
|
-
width: this.footRightOffset,
|
|
426
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
427
|
-
left: this.x,
|
|
428
|
-
top: this.y
|
|
429
|
-
})
|
|
430
436
|
this.$emit('enlarge', this.state)
|
|
431
437
|
},
|
|
432
438
|
minimizeTap() {
|
|
@@ -421,6 +421,12 @@ export default {
|
|
|
421
421
|
this.y = window.innerHeight / 2 - this.height / 2;
|
|
422
422
|
this.footDownOffset = this.height;
|
|
423
423
|
this.footRightOffset = this.width;
|
|
424
|
+
this.$emit('updateDrag', {
|
|
425
|
+
width: this.footRightOffset,
|
|
426
|
+
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
427
|
+
left: this.x,
|
|
428
|
+
top: this.y
|
|
429
|
+
})
|
|
424
430
|
}else {
|
|
425
431
|
this.fullScreen()
|
|
426
432
|
setTimeout(() => {
|
|
@@ -428,14 +434,14 @@ export default {
|
|
|
428
434
|
this.y = 0;
|
|
429
435
|
this.footDownOffset = window.outerHeight + 20;
|
|
430
436
|
this.footRightOffset = window.outerWidth + 20;
|
|
437
|
+
this.$emit('updateDrag', {
|
|
438
|
+
width: this.footRightOffset,
|
|
439
|
+
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
440
|
+
left: this.x,
|
|
441
|
+
top: this.y
|
|
442
|
+
})
|
|
431
443
|
},100)
|
|
432
444
|
}
|
|
433
|
-
this.$emit('updateDrag', {
|
|
434
|
-
width: this.footRightOffset,
|
|
435
|
-
height: this.footDownOffset - ((this.dragTextShow)?60:30),
|
|
436
|
-
left: this.x,
|
|
437
|
-
top: this.y
|
|
438
|
-
})
|
|
439
445
|
this.$emit('enlarge', this.state)
|
|
440
446
|
},
|
|
441
447
|
minimizeTap() {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
<div class="wrap wrap-block" :ref="`wrap-${item.id}`" v-for="(item,index) in pageInfoArr" :key="index">
|
|
26
26
|
<div class="wrap-can" v-show="!loading" ref="wrapCanBox">
|
|
27
27
|
<div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
|
|
28
|
-
<div class="extend-right-cont">
|
|
28
|
+
<div class="extend-right-cont" @click.stop="extendRight(null)">
|
|
29
29
|
<img src="../img/qubiezhen.svg" alt="">
|
|
30
|
-
<p
|
|
30
|
+
<p>链接扩展</p>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
33
|
<div class="textLayer" ref="textLayer">
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
<div class="wrap" ref="wrap" v-show="!doublePage">
|
|
78
78
|
<div class="wrap-can" v-show="!loading" ref="wrapCan">
|
|
79
79
|
<div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
|
|
80
|
-
<div class="extend-right-cont">
|
|
80
|
+
<div class="extend-right-cont" @click.stop="extendRight(null)">
|
|
81
81
|
<img src="../img/qubiezhen.svg" alt="">
|
|
82
|
-
<p
|
|
82
|
+
<p>链接扩展</p>
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
85
|
<div class="textLayer" ref="textLayer">
|
|
@@ -305,7 +305,7 @@ export default {
|
|
|
305
305
|
},
|
|
306
306
|
readOnly: {
|
|
307
307
|
type: Boolean,
|
|
308
|
-
default:
|
|
308
|
+
default: true
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
watch: {
|
|
@@ -337,7 +337,9 @@ export default {
|
|
|
337
337
|
handler: function (val) {
|
|
338
338
|
if (!val) return
|
|
339
339
|
this.points = val
|
|
340
|
+
this.processing()
|
|
340
341
|
},
|
|
342
|
+
deep:true,
|
|
341
343
|
immediate: true
|
|
342
344
|
},
|
|
343
345
|
isDoublePage: {
|
|
@@ -477,6 +479,7 @@ export default {
|
|
|
477
479
|
// 右键菜单
|
|
478
480
|
rightMenu(e) {
|
|
479
481
|
e.preventDefault()
|
|
482
|
+
if(this.readOnly) return;
|
|
480
483
|
if(!this.rightClick) return;
|
|
481
484
|
if(this.doublePage) return;
|
|
482
485
|
if(e.target.nodeName === 'SPAN') {
|
|
@@ -675,6 +678,7 @@ export default {
|
|
|
675
678
|
this.setShow = false
|
|
676
679
|
this.points = []
|
|
677
680
|
this.clearRect(true)
|
|
681
|
+
this.$emit('drawEnd', this.points,'empty')
|
|
678
682
|
},
|
|
679
683
|
preserve() {
|
|
680
684
|
this.setShow = false
|
|
@@ -695,6 +699,7 @@ export default {
|
|
|
695
699
|
} else {
|
|
696
700
|
this.points.pop()
|
|
697
701
|
}
|
|
702
|
+
this.$emit('drawEnd', this.points,'backward')
|
|
698
703
|
this.clearRect()
|
|
699
704
|
},
|
|
700
705
|
// 鼠标
|
|
@@ -1007,6 +1012,7 @@ export default {
|
|
|
1007
1012
|
i--
|
|
1008
1013
|
}
|
|
1009
1014
|
}
|
|
1015
|
+
this.$emit('drawEnd', this.points,'del')
|
|
1010
1016
|
this.clearRect()
|
|
1011
1017
|
},
|
|
1012
1018
|
// 绘制
|
|
@@ -1142,6 +1148,7 @@ export default {
|
|
|
1142
1148
|
color: obj.color,
|
|
1143
1149
|
size: obj.size,
|
|
1144
1150
|
})
|
|
1151
|
+
this.$emit('drawEnd', this.points)
|
|
1145
1152
|
},
|
|
1146
1153
|
// 画箭头
|
|
1147
1154
|
arrow(obj, type) {
|
|
@@ -1187,6 +1194,7 @@ export default {
|
|
|
1187
1194
|
color: obj.color,
|
|
1188
1195
|
border: obj.border,
|
|
1189
1196
|
})
|
|
1197
|
+
this.$emit('drawEnd', this.points)
|
|
1190
1198
|
}
|
|
1191
1199
|
},
|
|
1192
1200
|
// 画直线
|
|
@@ -1218,6 +1226,7 @@ export default {
|
|
|
1218
1226
|
color: obj.color,
|
|
1219
1227
|
border: obj.border,
|
|
1220
1228
|
})
|
|
1229
|
+
this.$emit('drawEnd', this.points)
|
|
1221
1230
|
}
|
|
1222
1231
|
},
|
|
1223
1232
|
// 画圆
|
|
@@ -1249,6 +1258,7 @@ export default {
|
|
|
1249
1258
|
color: obj.color,
|
|
1250
1259
|
border: obj.border,
|
|
1251
1260
|
})
|
|
1261
|
+
this.$emit('drawEnd', this.points)
|
|
1252
1262
|
}
|
|
1253
1263
|
},
|
|
1254
1264
|
// 画矩形
|
|
@@ -1279,6 +1289,7 @@ export default {
|
|
|
1279
1289
|
color: obj.color,
|
|
1280
1290
|
border: obj.border,
|
|
1281
1291
|
})
|
|
1292
|
+
this.$emit('drawEnd', this.points)
|
|
1282
1293
|
}
|
|
1283
1294
|
},
|
|
1284
1295
|
// 画线
|
|
@@ -1299,6 +1310,7 @@ export default {
|
|
|
1299
1310
|
this.ctx.stroke()
|
|
1300
1311
|
this.ctx.closePath()
|
|
1301
1312
|
this.points.push(obj)
|
|
1313
|
+
this.$emit('drawEnd', obj,'line')
|
|
1302
1314
|
},
|
|
1303
1315
|
clearRect(v) {
|
|
1304
1316
|
const width = this.canvasStyle.widthCanvas
|
|
@@ -1311,7 +1323,7 @@ export default {
|
|
|
1311
1323
|
this.ctx.beginPath()
|
|
1312
1324
|
this.ctx.moveTo(data.x * this.scales / data.scale + v.x, data.y * this.scales / data.scale + v.y)
|
|
1313
1325
|
if (data.start !== 'end') {
|
|
1314
|
-
this.ctx.lineTo(data2
|
|
1326
|
+
this.ctx.lineTo(data2?.x * this.scales / data2?.scale + v.x, data2?.y * this.scales / data2?.scale + v.y)
|
|
1315
1327
|
}
|
|
1316
1328
|
this.ctx.strokeStyle = data.color
|
|
1317
1329
|
this.ctx.lineCap = 'round'
|
|
@@ -1431,6 +1443,7 @@ export default {
|
|
|
1431
1443
|
}
|
|
1432
1444
|
},
|
|
1433
1445
|
flipLeft(e, v) {
|
|
1446
|
+
this.extendRightDel()
|
|
1434
1447
|
if (e > this.pdfPages) {
|
|
1435
1448
|
this.pageIndex = this.pdfPages
|
|
1436
1449
|
return
|
|
@@ -1451,6 +1464,7 @@ export default {
|
|
|
1451
1464
|
}
|
|
1452
1465
|
},
|
|
1453
1466
|
flipRight(e, v) {
|
|
1467
|
+
this.extendRightDel()
|
|
1454
1468
|
if (e < 1) {
|
|
1455
1469
|
this.pageIndex = 1
|
|
1456
1470
|
return
|
|
@@ -154,10 +154,10 @@ export default {
|
|
|
154
154
|
},
|
|
155
155
|
handleMountedEditor(editor) {
|
|
156
156
|
editorAPP = editor
|
|
157
|
-
editorAPP.sideEffects.registerAfterChangeHandler('shape', debounce((next)=> {
|
|
157
|
+
editorAPP.sideEffects.registerAfterChangeHandler('shape', debounce((prev, next)=> {
|
|
158
158
|
// there can only be one red shape at a time:
|
|
159
|
-
this.$emit('shapeChangeHandler',
|
|
160
|
-
},
|
|
159
|
+
this.$emit('shapeChangeHandler', prev);
|
|
160
|
+
},200) )
|
|
161
161
|
editorAPP.sideEffects.registerAfterDeleteHandler('shape', (shape) => {
|
|
162
162
|
// if the last shape in a frame is deleted, delete the frame too:
|
|
163
163
|
this.$emit('shapeDeleteHandler', shape);
|
|
@@ -182,18 +182,25 @@ export default {
|
|
|
182
182
|
// 清空
|
|
183
183
|
clear() {
|
|
184
184
|
// editorAPP.store.loadSnapshot(clearJson)
|
|
185
|
-
editorAPP
|
|
186
|
-
let graphicIds = editorAPP
|
|
185
|
+
editorAPP?.selectAll()
|
|
186
|
+
let graphicIds = editorAPP?.getSelectedShapeIds()
|
|
187
187
|
// for(let key in editorAPP.store.query.atoms.current) {
|
|
188
188
|
// if(key.split(':')[0]==='shape') {
|
|
189
189
|
// graphicIds.push(key)
|
|
190
190
|
// }
|
|
191
191
|
// }
|
|
192
|
-
editorAPP
|
|
192
|
+
editorAPP?.deleteShapes(graphicIds)
|
|
193
|
+
},
|
|
194
|
+
//
|
|
195
|
+
editorCreateShape(myShape){
|
|
196
|
+
editorAPP.createShape(myShape)
|
|
197
|
+
},
|
|
198
|
+
editorDeleteShape(shapeId){
|
|
199
|
+
editorAPP.deleteShape(shapeId)
|
|
193
200
|
},
|
|
194
201
|
// 添加快照
|
|
195
202
|
setSnapshot(v) {
|
|
196
|
-
editorAPP.store
|
|
203
|
+
editorAPP.store?.loadSnapshot(v)
|
|
197
204
|
this.isFocused()
|
|
198
205
|
},
|
|
199
206
|
// 获取快照
|
|
@@ -222,7 +229,6 @@ export default {
|
|
|
222
229
|
},
|
|
223
230
|
arrow(v) {
|
|
224
231
|
// 'none', 'semi', 'solid', 'pattern'
|
|
225
|
-
console.log('arrowarrowarrowarrowarrow');
|
|
226
232
|
this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
|
|
227
233
|
this.styleProps('arrow', 'size').defaultValue = v?.size ?? 'm'
|
|
228
234
|
this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
@@ -464,7 +470,7 @@ export default {
|
|
|
464
470
|
isFocused() {
|
|
465
471
|
const top = document.documentElement.scrollTop
|
|
466
472
|
setTimeout(() => {
|
|
467
|
-
editorAPP
|
|
473
|
+
editorAPP?.updateInstanceState({isFocused: true})
|
|
468
474
|
document.documentElement.scrollTop = top
|
|
469
475
|
}, 10)
|
|
470
476
|
}
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
color: rgba(0,0,0,0.6);
|
|
100
100
|
margin-top: 140px;
|
|
101
101
|
}
|
|
102
|
-
.but{
|
|
102
|
+
.but-tag{
|
|
103
103
|
margin-left: 5px;
|
|
104
104
|
font-size: 12px;
|
|
105
105
|
background-color: transparent;
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
min-width: 60px;
|
|
111
111
|
height: 21px;
|
|
112
|
+
line-height: 17px;
|
|
112
113
|
}
|
|
113
114
|
.annotation-list{
|
|
114
115
|
margin: 10px;
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
<em>{{ item.time === '' ? '' : '(' + item.time + ')' }}</em>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="list-right" v-if="!readOnlys">
|
|
40
|
-
<button v-if="item.readable" class="but" @click.stop="preservation(item.id,index)">保存批注</button>
|
|
41
|
-
<button v-if="item.readable" class="but" @click.stop="cancel(item.id,index)">取消批注</button>
|
|
42
|
-
<button v-if="!item.readable" class="but" @click.stop="modify(index)">修改批注</button>
|
|
43
|
-
<button v-if="!item.readable" class="but" @click.stop="del(item.id,index)">删除批注</button>
|
|
40
|
+
<button v-if="item.readable" class="but-tag" @click.stop="preservation(item.id,index)">保存批注</button>
|
|
41
|
+
<button v-if="item.readable" class="but-tag" @click.stop="cancel(item.id,index)">取消批注</button>
|
|
42
|
+
<button v-if="!item.readable" class="but-tag" @click.stop="modify(index)">修改批注</button>
|
|
43
|
+
<button v-if="!item.readable" class="but-tag" @click.stop="del(item.id,index)">删除批注</button>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div class="list-cont">
|