zydx-plus 1.35.522 → 1.35.523
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
|
@@ -282,6 +282,7 @@ export default {
|
|
|
282
282
|
this.clientHeight = document.documentElement.clientHeight;
|
|
283
283
|
this.x = this.clientWidth / 2 - this.footRightOffset / 2;
|
|
284
284
|
this.y = this.clientHeight / 2 - this.footDownOffset / 2;
|
|
285
|
+
this.y=isNaN(this.y)?100:this.y
|
|
285
286
|
}
|
|
286
287
|
setTimeout(() => {
|
|
287
288
|
interact(`#draggable${that.id}`).draggable({
|
|
@@ -291,6 +291,7 @@ export default {
|
|
|
291
291
|
this.clientHeight = document.documentElement.clientHeight;
|
|
292
292
|
this.x = this.clientWidth / 2 - this.footRightOffset / 2;
|
|
293
293
|
this.y = this.clientHeight / 2 - this.footDownOffset / 2;
|
|
294
|
+
this.y=isNaN(this.y)?100:this.y
|
|
294
295
|
}
|
|
295
296
|
setTimeout(() => {
|
|
296
297
|
interact(`#draggable${that.id}`).draggable({
|
|
@@ -387,13 +387,32 @@
|
|
|
387
387
|
<!-- 展示弹窗 -->
|
|
388
388
|
<div v-for="(item,index) in interpositionData" :key="index">
|
|
389
389
|
<zydx-drag-popup v-if="item.isShow" :drag-text-show="false" :enlargeShow="false" :minHeight="183"
|
|
390
|
-
:minWidth="['importWorks', 'linkCourseware', 'importArticles', 'videoLink'].indexOf(item.type) === -1 ? 640 :905"
|
|
390
|
+
:minWidth="['importWorks', 'linkCourseware', 'importArticles', 'videoLink','group-upload'].indexOf(item.type) === -1 ? 640 :905"
|
|
391
391
|
:minimize="false" :minimizeCir="false"
|
|
392
|
-
:title="titleDragPopup[item.type]?titleDragPopup[item.type]
|
|
393
|
-
:width="['importWorks', 'linkCourseware', 'importArticles', 'videoLink'].indexOf(item.type) === -1 ? 640 :905"
|
|
394
|
-
height
|
|
392
|
+
:title="titleDragPopup[item.type]?titleDragPopup[item.type]:`参考文献`"
|
|
393
|
+
:width="['importWorks', 'linkCourseware', 'importArticles', 'videoLink','group-upload'].indexOf(item.type) === -1 ? 640 :905"
|
|
394
|
+
auto-height
|
|
395
395
|
@close="closeDataShowPopup(item)">
|
|
396
396
|
<template #content>
|
|
397
|
+
<div v-if="item.type === 'group-upload'" style="padding: 5px 10px 10px 10px;height: 100%;">
|
|
398
|
+
<div class="p-popup-title-box">
|
|
399
|
+
<span class="p-popup-title-name">文章内容</span>
|
|
400
|
+
<div v-if="!readOnly" class="tip-btnBox" style="margin: 0">
|
|
401
|
+
<div class="tip-btn" style="margin-right: 0" @click="delAnnotatedLiterature(item.id,item.type)"
|
|
402
|
+
v-html="'删除'"></div>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
<div class="tip-box" style="min-width:600px;max-height: 900px;">
|
|
406
|
+
<div class="tip-title" v-html="`${item.fileName}`"></div>
|
|
407
|
+
<div class="tip-boxContent" style="height: 700px;">
|
|
408
|
+
<zydx-read :url="item.url" style="height: 100%"></zydx-read>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
<div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top: 10px;">
|
|
412
|
+
<div class="tip-btn" @click="item.isShow=false" v-html="`关闭`"></div>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
|
|
397
416
|
<div v-if="item.type === 'taggingMenu'" style="padding: 5px 10px 10px 10px">
|
|
398
417
|
<div class="p-popup-title-box">
|
|
399
418
|
<span class="p-popup-title-name">注释内容</span>
|
|
@@ -455,7 +474,7 @@
|
|
|
455
474
|
v-html="'删除'"></div>
|
|
456
475
|
</div>
|
|
457
476
|
</div>
|
|
458
|
-
<div class="tip-box" style="min-width:600px;">
|
|
477
|
+
<div class="tip-box" style="min-width:600px;max-height: 900px;">
|
|
459
478
|
<div class="tip-title" v-html="`${item.exegesis}`"></div>
|
|
460
479
|
<div class="tip-boxContent">
|
|
461
480
|
<zydx-read :url="item.url" style="height: 100%"></zydx-read>
|
|
@@ -611,7 +630,7 @@ import zydxColoring from '../../coloring'
|
|
|
611
630
|
import Message from '../../../components/tipBox/index';
|
|
612
631
|
import zydxTextarea from '../../textarea'
|
|
613
632
|
import zydxRead from '../../read'
|
|
614
|
-
import zydxDragPopup from '../../
|
|
633
|
+
import zydxDragPopup from '../../dragPopup2'
|
|
615
634
|
import zydxSelect from '../../select'
|
|
616
635
|
import {exegesisId} from "./extend/exegesis-id";
|
|
617
636
|
import {html2json, json2html} from '../../utils/html2json.js'
|
|
@@ -685,7 +704,8 @@ export default {
|
|
|
685
704
|
importArticles: '链接文章',
|
|
686
705
|
importWorks: '链接著作',
|
|
687
706
|
videoLink: '链接视频',
|
|
688
|
-
linkCourseware: '链接课件'
|
|
707
|
+
linkCourseware: '链接课件',
|
|
708
|
+
'group-upload':'附件'
|
|
689
709
|
},
|
|
690
710
|
literature: ['periodical', 'dissertation', 'writings', 'newspaper', 'customize'],
|
|
691
711
|
literatureName: {
|
|
@@ -2025,10 +2045,37 @@ export default {
|
|
|
2025
2045
|
// 下载附件
|
|
2026
2046
|
enlDownload() {
|
|
2027
2047
|
this.$emit('enlDownload', this.encIndex)
|
|
2048
|
+
const urlToBlob = (url) => {
|
|
2049
|
+
return fetch(url).then(response => response.blob())
|
|
2050
|
+
.then(blob => blob);
|
|
2051
|
+
}
|
|
2052
|
+
// file { fileName: '1.pdf', url: 'http://192.168.155.31:8888/group1/M00/03/1B/wKibH2bxL0SAepw4AADv47rruEo751.pdf' }
|
|
2053
|
+
const downloadOfBlob = (file) => {
|
|
2054
|
+
urlToBlob(file.dataUrl).then((blob) => {
|
|
2055
|
+
const href = window.URL.createObjectURL(blob)
|
|
2056
|
+
const downloadElement = document.createElement("a")
|
|
2057
|
+
downloadElement.href = href
|
|
2058
|
+
downloadElement.target = "_blank"
|
|
2059
|
+
downloadElement.download = file.dataName
|
|
2060
|
+
document.body.appendChild(downloadElement)
|
|
2061
|
+
downloadElement.click()
|
|
2062
|
+
document.body.removeChild(downloadElement)
|
|
2063
|
+
window.URL.revokeObjectURL(href)
|
|
2064
|
+
}).catch(error => {
|
|
2065
|
+
console.error('downloadOfBlob_error', error)
|
|
2066
|
+
})
|
|
2067
|
+
}
|
|
2068
|
+
downloadOfBlob(this.encIndex)
|
|
2028
2069
|
},
|
|
2029
2070
|
// 查看附件
|
|
2030
2071
|
enlSee() {
|
|
2031
2072
|
this.$emit('enlSee', this.encIndex)
|
|
2073
|
+
let id = this.encIndex.signId.split('u-').join('')
|
|
2074
|
+
this.interpositionData.forEach(item => {
|
|
2075
|
+
if (item.id === id) {
|
|
2076
|
+
item.isShow = true
|
|
2077
|
+
}
|
|
2078
|
+
})
|
|
2032
2079
|
},
|
|
2033
2080
|
// 删除附件
|
|
2034
2081
|
enlDel() {
|
|
@@ -2039,6 +2086,8 @@ export default {
|
|
|
2039
2086
|
const val = json.content[i].attrs?.signId
|
|
2040
2087
|
if (val === this.encIndex.signId) {
|
|
2041
2088
|
json.content.splice(i, 1)
|
|
2089
|
+
let id = val.split('u-').join('')
|
|
2090
|
+
this.interpositionData=this.interpositionData.filter(item=>item.id!==id)
|
|
2042
2091
|
this.editor?.commands.setContent(json)
|
|
2043
2092
|
break
|
|
2044
2093
|
}
|
|
@@ -2298,6 +2347,18 @@ export default {
|
|
|
2298
2347
|
top: `${e.clientY - only.top - 40}px`,
|
|
2299
2348
|
left: `${e.clientX - only.left - 60}px`
|
|
2300
2349
|
}
|
|
2350
|
+
this.encIndex = {
|
|
2351
|
+
borderBottom : "",
|
|
2352
|
+
cont: "false",
|
|
2353
|
+
dataUrl: p[i].dataset.url,
|
|
2354
|
+
dataName:e.target.innerText,
|
|
2355
|
+
exegesisId: null,
|
|
2356
|
+
lineHeightId: "indent mu",
|
|
2357
|
+
margin: '',
|
|
2358
|
+
signId: p[i].dataset.signid,
|
|
2359
|
+
textAlign: null,
|
|
2360
|
+
titleId: "indent mu"
|
|
2361
|
+
}
|
|
2301
2362
|
}
|
|
2302
2363
|
}
|
|
2303
2364
|
|
|
@@ -2623,11 +2684,21 @@ export default {
|
|
|
2623
2684
|
const t = await this.signIdData('enclosure')
|
|
2624
2685
|
const r = await this.signIdData('reference')
|
|
2625
2686
|
const html = butJson(this.editor, this.menusText)[v].html
|
|
2626
|
-
if (r === -1) {
|
|
2687
|
+
// if (r === -1) {
|
|
2627
2688
|
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
2689
|
+
const id = new Date().getTime()
|
|
2690
|
+
let dataInfo = {
|
|
2691
|
+
isShow: false,
|
|
2692
|
+
edit: false,
|
|
2693
|
+
id: `${id}`,
|
|
2694
|
+
type: v,
|
|
2695
|
+
exegesis: this.tipTitle,
|
|
2696
|
+
fileName: name,
|
|
2697
|
+
url: url
|
|
2698
|
+
}
|
|
2628
2699
|
if (t === -1) this.editor.chain().focus().insertContentAt(to, html).run()
|
|
2629
2700
|
const num = this.upSort(this.editor, 'enclosure')
|
|
2630
|
-
const html2 = `<p contenteditable="false" data-signId="u-${
|
|
2701
|
+
const html2 = `<p contenteditable="false" data-signId="u-${id}" data-url="${url}" class="indent mu"><span>${num.num}. ${name}</span></p>`
|
|
2631
2702
|
this.editor.chain().focus().insertContentAt(num.len, html2).run()
|
|
2632
2703
|
const json = this.editor.getJSON()
|
|
2633
2704
|
for (let i = 0; i < json.content.length; i++) {
|
|
@@ -2639,12 +2710,24 @@ export default {
|
|
|
2639
2710
|
this.editor.chain().setContent(<p></p>).run()
|
|
2640
2711
|
this.editor.chain().setContent(json).run()
|
|
2641
2712
|
this.isShowUpload = false
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2713
|
+
this.interpositionData.push(dataInfo)
|
|
2714
|
+
this.documentClick()
|
|
2715
|
+
// return
|
|
2716
|
+
// }
|
|
2717
|
+
/*const num1 = this.upSort(this.editor, 'reference')
|
|
2645
2718
|
if (t === -1) this.editor.chain().focus().insertContentAt(num1.len - 7, html).run()
|
|
2646
2719
|
const num = this.upSort(this.editor, 'enclosure')
|
|
2647
|
-
const
|
|
2720
|
+
const id = new Date().getTime()
|
|
2721
|
+
let dataInfo = {
|
|
2722
|
+
isShow: false,
|
|
2723
|
+
edit: false,
|
|
2724
|
+
id: `${id}`,
|
|
2725
|
+
type: v,
|
|
2726
|
+
exegesis: this.tipTitle,
|
|
2727
|
+
fileName: name,
|
|
2728
|
+
url: url
|
|
2729
|
+
}
|
|
2730
|
+
const html2 = `<p contenteditable="false" data-signId="u-${id}" data-url="${url}" class="indent mu"><span>${num.num}. ${name}</span></p>`
|
|
2648
2731
|
this.editor.chain().focus().insertContentAt(num.len, html2).run()
|
|
2649
2732
|
const json = this.editor.getJSON()
|
|
2650
2733
|
for (let i = 0; i < json.content.length; i++) {
|
|
@@ -2656,6 +2739,8 @@ export default {
|
|
|
2656
2739
|
this.editor.chain().setContent(<p></p>).run()
|
|
2657
2740
|
this.editor.chain().setContent(json).run()
|
|
2658
2741
|
this.isShowUpload = false
|
|
2742
|
+
this.interpositionData.push(dataInfo)
|
|
2743
|
+
this.documentClick()*/
|
|
2659
2744
|
})
|
|
2660
2745
|
}
|
|
2661
2746
|
if (v === 'uploadImage') {
|
|
@@ -4693,6 +4778,10 @@ li {
|
|
|
4693
4778
|
opacity: 0;
|
|
4694
4779
|
position: relative;
|
|
4695
4780
|
}
|
|
4781
|
+
.tip-boxContent::-webkit-scrollbar{
|
|
4782
|
+
width: 0;
|
|
4783
|
+
opacity: 0;
|
|
4784
|
+
}
|
|
4696
4785
|
|
|
4697
4786
|
.tip-title {
|
|
4698
4787
|
font-size: 16px;
|
|
@@ -4714,6 +4803,10 @@ li {
|
|
|
4714
4803
|
max-height: 700px;
|
|
4715
4804
|
}
|
|
4716
4805
|
|
|
4806
|
+
.tip-box>.tip-boxContent {
|
|
4807
|
+
height: 700px;
|
|
4808
|
+
}
|
|
4809
|
+
|
|
4717
4810
|
.tip-title {
|
|
4718
4811
|
margin-bottom: 20px;
|
|
4719
4812
|
font-size: 18px;
|
|
@@ -5050,4 +5143,7 @@ li {
|
|
|
5050
5143
|
* {
|
|
5051
5144
|
box-sizing: border-box;
|
|
5052
5145
|
}
|
|
5146
|
+
:deep(.drag-down2){
|
|
5147
|
+
height: 20px;
|
|
5148
|
+
}
|
|
5053
5149
|
</style>
|
|
@@ -95,6 +95,10 @@ export default {
|
|
|
95
95
|
type: Boolean,
|
|
96
96
|
default: false
|
|
97
97
|
},
|
|
98
|
+
isToolLocked: { // 菜单工具锁
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: true
|
|
101
|
+
},
|
|
98
102
|
},
|
|
99
103
|
mounted() {
|
|
100
104
|
// 鼠标移入
|
|
@@ -149,7 +153,9 @@ export default {
|
|
|
149
153
|
},
|
|
150
154
|
handleMountedEditor(editor) {
|
|
151
155
|
editorAPP = editor
|
|
156
|
+
console.log('editorAPP',editorAPP);
|
|
152
157
|
editorAPP._cameraOptions.current.isLocked = this.cameraIsLocked
|
|
158
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
153
159
|
if (this.top) {
|
|
154
160
|
setTimeout(() => {
|
|
155
161
|
document.documentElement.scrollTop = 0
|
|
@@ -167,8 +173,14 @@ export default {
|
|
|
167
173
|
},
|
|
168
174
|
// 清空
|
|
169
175
|
clear() {
|
|
170
|
-
editorAPP.store.loadSnapshot(clearJson)
|
|
171
|
-
|
|
176
|
+
// editorAPP.store.loadSnapshot(clearJson)
|
|
177
|
+
let graphicIds = []
|
|
178
|
+
for(let key in editorAPP.store.query.atoms.current) {
|
|
179
|
+
if(key.split(':')[0]==='shape') {
|
|
180
|
+
graphicIds.push(key)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
editorAPP.deleteShapes(graphicIds)
|
|
172
184
|
},
|
|
173
185
|
// 添加快照
|
|
174
186
|
setSnapshot(v) {
|
|
@@ -185,23 +197,29 @@ export default {
|
|
|
185
197
|
this.styleProps('draw', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
186
198
|
this.styleProps('draw', 'fill').defaultValue = v?.fill ?? 'none'
|
|
187
199
|
editorAPP.setCurrentTool('draw')
|
|
200
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
188
201
|
},
|
|
189
202
|
select() {
|
|
190
203
|
editorAPP.setCurrentTool('select')
|
|
204
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
191
205
|
},
|
|
192
206
|
hand() {
|
|
193
207
|
editorAPP.setCurrentTool('hand')
|
|
208
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
194
209
|
},
|
|
195
210
|
eraser() {
|
|
196
211
|
editorAPP.setCurrentTool('eraser')
|
|
212
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
197
213
|
},
|
|
198
214
|
arrow(v) {
|
|
199
215
|
// 'none', 'semi', 'solid', 'pattern'
|
|
216
|
+
console.log('arrowarrowarrowarrowarrow');
|
|
200
217
|
this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
|
|
201
218
|
this.styleProps('arrow', 'size').defaultValue = v?.size ?? 'm'
|
|
202
219
|
this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
203
220
|
this.styleProps('arrow', 'fill').defaultValue = v?.fill ?? 'none'
|
|
204
221
|
editorAPP.setCurrentTool('arrow')
|
|
222
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
205
223
|
},
|
|
206
224
|
text(v) {
|
|
207
225
|
this.styleProps('text', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -209,6 +227,7 @@ export default {
|
|
|
209
227
|
this.styleProps('text', 'font').defaultValue = v?.font ?? 'draw' //['draw', 'sans', 'serif', 'mono']
|
|
210
228
|
// this.styleProps('text', 'align').defaultValue = v?.align ?? 'start'
|
|
211
229
|
editorAPP.setCurrentTool('text')
|
|
230
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
212
231
|
},
|
|
213
232
|
note(v) {
|
|
214
233
|
let verticalAlign = ['middle-legacy', 'start-legacy', 'end-legacy']
|
|
@@ -222,6 +241,7 @@ export default {
|
|
|
222
241
|
this.styleProps('note', 'size').defaultValue = v?.size ?? 'm'
|
|
223
242
|
this.styleProps('note', 'font').defaultValue = v?.font ?? 'draw' //['draw', 'sans', 'serif', 'mono']
|
|
224
243
|
editorAPP.setCurrentTool('note')
|
|
244
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
225
245
|
},
|
|
226
246
|
line(v) {
|
|
227
247
|
this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -229,6 +249,7 @@ export default {
|
|
|
229
249
|
this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
230
250
|
this.styleProps('arrow', 'fill').defaultValue = v?.fill ?? 'none'
|
|
231
251
|
editorAPP.setCurrentTool('line')
|
|
252
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
232
253
|
},
|
|
233
254
|
rectangle(v) {
|
|
234
255
|
this.styleProps('geo', 'geo').defaultValue = 'rectangle'
|
|
@@ -237,6 +258,7 @@ export default {
|
|
|
237
258
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
238
259
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
239
260
|
editorAPP.setCurrentTool('geo')
|
|
261
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
240
262
|
},
|
|
241
263
|
ellipse(v) {
|
|
242
264
|
this.styleProps('geo', 'geo').defaultValue = 'ellipse'
|
|
@@ -245,6 +267,7 @@ export default {
|
|
|
245
267
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
246
268
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
247
269
|
editorAPP.setCurrentTool('geo')
|
|
270
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
248
271
|
},
|
|
249
272
|
triangle(v) {
|
|
250
273
|
this.styleProps('geo', 'geo').defaultValue = 'triangle'
|
|
@@ -253,6 +276,7 @@ export default {
|
|
|
253
276
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
254
277
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
255
278
|
editorAPP.setCurrentTool('geo')
|
|
279
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
256
280
|
},
|
|
257
281
|
|
|
258
282
|
rhombus(v) {
|
|
@@ -262,6 +286,7 @@ export default {
|
|
|
262
286
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
263
287
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
264
288
|
editorAPP.setCurrentTool('geo')
|
|
289
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
265
290
|
},
|
|
266
291
|
cloud(v) {
|
|
267
292
|
this.styleProps('geo', 'geo').defaultValue = 'cloud'
|
|
@@ -270,6 +295,7 @@ export default {
|
|
|
270
295
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
271
296
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
272
297
|
editorAPP.setCurrentTool('geo')
|
|
298
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
273
299
|
},
|
|
274
300
|
trapezoid(v) {
|
|
275
301
|
this.styleProps('geo', 'geo').defaultValue = 'trapezoid'
|
|
@@ -278,6 +304,7 @@ export default {
|
|
|
278
304
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
279
305
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
280
306
|
editorAPP.setCurrentTool('geo')
|
|
307
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
281
308
|
},
|
|
282
309
|
diamond(v) {
|
|
283
310
|
this.styleProps('geo', 'geo').defaultValue = 'diamond'
|
|
@@ -286,6 +313,7 @@ export default {
|
|
|
286
313
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
287
314
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
288
315
|
editorAPP.setCurrentTool('geo')
|
|
316
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
289
317
|
},
|
|
290
318
|
star(v) {
|
|
291
319
|
this.styleProps('geo', 'geo').defaultValue = 'star'
|
|
@@ -294,6 +322,7 @@ export default {
|
|
|
294
322
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
295
323
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
296
324
|
editorAPP.setCurrentTool('geo')
|
|
325
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
297
326
|
},
|
|
298
327
|
|
|
299
328
|
xBox(v) {
|
|
@@ -303,6 +332,7 @@ export default {
|
|
|
303
332
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
304
333
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
305
334
|
editorAPP.setCurrentTool('geo')
|
|
335
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
306
336
|
},
|
|
307
337
|
checkBox(v) {
|
|
308
338
|
this.styleProps('geo', 'geo').defaultValue = 'check-box'
|
|
@@ -311,6 +341,7 @@ export default {
|
|
|
311
341
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
312
342
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
313
343
|
editorAPP.setCurrentTool('geo')
|
|
344
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
314
345
|
},
|
|
315
346
|
oval(v) {
|
|
316
347
|
this.styleProps('geo', 'geo').defaultValue = 'oval'
|
|
@@ -319,6 +350,7 @@ export default {
|
|
|
319
350
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
320
351
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
321
352
|
editorAPP.setCurrentTool('geo')
|
|
353
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
322
354
|
},
|
|
323
355
|
arrowLeft(v) {
|
|
324
356
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-left'
|
|
@@ -327,6 +359,7 @@ export default {
|
|
|
327
359
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
328
360
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
329
361
|
editorAPP.setCurrentTool('geo')
|
|
362
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
330
363
|
},
|
|
331
364
|
arrowRight(v) {
|
|
332
365
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-right'
|
|
@@ -335,6 +368,7 @@ export default {
|
|
|
335
368
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
336
369
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
337
370
|
editorAPP.setCurrentTool('geo')
|
|
371
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
338
372
|
},
|
|
339
373
|
arrowUp(v) {
|
|
340
374
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-up'
|
|
@@ -343,6 +377,7 @@ export default {
|
|
|
343
377
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
344
378
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
345
379
|
editorAPP.setCurrentTool('geo')
|
|
380
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
346
381
|
},
|
|
347
382
|
arrowDown(v) {
|
|
348
383
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-down'
|
|
@@ -351,6 +386,7 @@ export default {
|
|
|
351
386
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
352
387
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
353
388
|
editorAPP.setCurrentTool('geo')
|
|
389
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
354
390
|
},
|
|
355
391
|
hexagon(v) {
|
|
356
392
|
this.styleProps('geo', 'geo').defaultValue = 'hexagon'
|
|
@@ -359,6 +395,7 @@ export default {
|
|
|
359
395
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
360
396
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
361
397
|
editorAPP.setCurrentTool('geo')
|
|
398
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
362
399
|
},
|
|
363
400
|
highlight(v) {
|
|
364
401
|
this.styleProps('geo', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -366,6 +403,7 @@ export default {
|
|
|
366
403
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
367
404
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
368
405
|
editorAPP.setCurrentTool('highlight')
|
|
406
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
369
407
|
},
|
|
370
408
|
insertPicture(img) {
|
|
371
409
|
const assetId = AssetRecordType.createId()
|
|
@@ -400,6 +438,7 @@ export default {
|
|
|
400
438
|
},
|
|
401
439
|
laser() {
|
|
402
440
|
editorAPP.setCurrentTool('laser')
|
|
441
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
403
442
|
},
|
|
404
443
|
undo() {
|
|
405
444
|
editorAPP.undo()
|