zydx-plus 1.35.521 → 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>
|
|
@@ -91,6 +91,14 @@ export default {
|
|
|
91
91
|
type: Boolean,
|
|
92
92
|
default: false
|
|
93
93
|
},
|
|
94
|
+
cameraIsLocked: { // 相机约束
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
98
|
+
isToolLocked: { // 菜单工具锁
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: true
|
|
101
|
+
},
|
|
94
102
|
},
|
|
95
103
|
mounted() {
|
|
96
104
|
// 鼠标移入
|
|
@@ -101,13 +109,12 @@ export default {
|
|
|
101
109
|
this.$refs.reactRef.addEventListener('mouseleave', () => {
|
|
102
110
|
document.body.style.overflow = 'visible'
|
|
103
111
|
});
|
|
104
|
-
|
|
105
112
|
const root = createRoot(this.$refs.reactRef)
|
|
106
113
|
root.render(createElement(Tldraw, {
|
|
107
114
|
onMount: this.handleMountedEditor,
|
|
108
115
|
hideUi: true, // 隐藏UI
|
|
109
116
|
// persistenceKey: "example111" // 持久化名字
|
|
110
|
-
autoFocus: true
|
|
117
|
+
autoFocus: true, // 聚焦
|
|
111
118
|
}, null))
|
|
112
119
|
},
|
|
113
120
|
methods: {
|
|
@@ -146,6 +153,9 @@ export default {
|
|
|
146
153
|
},
|
|
147
154
|
handleMountedEditor(editor) {
|
|
148
155
|
editorAPP = editor
|
|
156
|
+
console.log('editorAPP',editorAPP);
|
|
157
|
+
editorAPP._cameraOptions.current.isLocked = this.cameraIsLocked
|
|
158
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
149
159
|
if (this.top) {
|
|
150
160
|
setTimeout(() => {
|
|
151
161
|
document.documentElement.scrollTop = 0
|
|
@@ -163,8 +173,14 @@ export default {
|
|
|
163
173
|
},
|
|
164
174
|
// 清空
|
|
165
175
|
clear() {
|
|
166
|
-
editorAPP.store.loadSnapshot(clearJson)
|
|
167
|
-
|
|
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)
|
|
168
184
|
},
|
|
169
185
|
// 添加快照
|
|
170
186
|
setSnapshot(v) {
|
|
@@ -181,23 +197,29 @@ export default {
|
|
|
181
197
|
this.styleProps('draw', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
182
198
|
this.styleProps('draw', 'fill').defaultValue = v?.fill ?? 'none'
|
|
183
199
|
editorAPP.setCurrentTool('draw')
|
|
200
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
184
201
|
},
|
|
185
202
|
select() {
|
|
186
203
|
editorAPP.setCurrentTool('select')
|
|
204
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
187
205
|
},
|
|
188
206
|
hand() {
|
|
189
207
|
editorAPP.setCurrentTool('hand')
|
|
208
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
190
209
|
},
|
|
191
210
|
eraser() {
|
|
192
211
|
editorAPP.setCurrentTool('eraser')
|
|
212
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
193
213
|
},
|
|
194
214
|
arrow(v) {
|
|
195
215
|
// 'none', 'semi', 'solid', 'pattern'
|
|
216
|
+
console.log('arrowarrowarrowarrowarrow');
|
|
196
217
|
this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
|
|
197
218
|
this.styleProps('arrow', 'size').defaultValue = v?.size ?? 'm'
|
|
198
219
|
this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
199
220
|
this.styleProps('arrow', 'fill').defaultValue = v?.fill ?? 'none'
|
|
200
221
|
editorAPP.setCurrentTool('arrow')
|
|
222
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
201
223
|
},
|
|
202
224
|
text(v) {
|
|
203
225
|
this.styleProps('text', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -205,6 +227,7 @@ export default {
|
|
|
205
227
|
this.styleProps('text', 'font').defaultValue = v?.font ?? 'draw' //['draw', 'sans', 'serif', 'mono']
|
|
206
228
|
// this.styleProps('text', 'align').defaultValue = v?.align ?? 'start'
|
|
207
229
|
editorAPP.setCurrentTool('text')
|
|
230
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
208
231
|
},
|
|
209
232
|
note(v) {
|
|
210
233
|
let verticalAlign = ['middle-legacy', 'start-legacy', 'end-legacy']
|
|
@@ -218,6 +241,7 @@ export default {
|
|
|
218
241
|
this.styleProps('note', 'size').defaultValue = v?.size ?? 'm'
|
|
219
242
|
this.styleProps('note', 'font').defaultValue = v?.font ?? 'draw' //['draw', 'sans', 'serif', 'mono']
|
|
220
243
|
editorAPP.setCurrentTool('note')
|
|
244
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
221
245
|
},
|
|
222
246
|
line(v) {
|
|
223
247
|
this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -225,6 +249,7 @@ export default {
|
|
|
225
249
|
this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
226
250
|
this.styleProps('arrow', 'fill').defaultValue = v?.fill ?? 'none'
|
|
227
251
|
editorAPP.setCurrentTool('line')
|
|
252
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
228
253
|
},
|
|
229
254
|
rectangle(v) {
|
|
230
255
|
this.styleProps('geo', 'geo').defaultValue = 'rectangle'
|
|
@@ -233,6 +258,7 @@ export default {
|
|
|
233
258
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
234
259
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
235
260
|
editorAPP.setCurrentTool('geo')
|
|
261
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
236
262
|
},
|
|
237
263
|
ellipse(v) {
|
|
238
264
|
this.styleProps('geo', 'geo').defaultValue = 'ellipse'
|
|
@@ -241,6 +267,7 @@ export default {
|
|
|
241
267
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
242
268
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
243
269
|
editorAPP.setCurrentTool('geo')
|
|
270
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
244
271
|
},
|
|
245
272
|
triangle(v) {
|
|
246
273
|
this.styleProps('geo', 'geo').defaultValue = 'triangle'
|
|
@@ -249,6 +276,7 @@ export default {
|
|
|
249
276
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
250
277
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
251
278
|
editorAPP.setCurrentTool('geo')
|
|
279
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
252
280
|
},
|
|
253
281
|
|
|
254
282
|
rhombus(v) {
|
|
@@ -258,6 +286,7 @@ export default {
|
|
|
258
286
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
259
287
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
260
288
|
editorAPP.setCurrentTool('geo')
|
|
289
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
261
290
|
},
|
|
262
291
|
cloud(v) {
|
|
263
292
|
this.styleProps('geo', 'geo').defaultValue = 'cloud'
|
|
@@ -266,6 +295,7 @@ export default {
|
|
|
266
295
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
267
296
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
268
297
|
editorAPP.setCurrentTool('geo')
|
|
298
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
269
299
|
},
|
|
270
300
|
trapezoid(v) {
|
|
271
301
|
this.styleProps('geo', 'geo').defaultValue = 'trapezoid'
|
|
@@ -274,6 +304,7 @@ export default {
|
|
|
274
304
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
275
305
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
276
306
|
editorAPP.setCurrentTool('geo')
|
|
307
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
277
308
|
},
|
|
278
309
|
diamond(v) {
|
|
279
310
|
this.styleProps('geo', 'geo').defaultValue = 'diamond'
|
|
@@ -282,6 +313,7 @@ export default {
|
|
|
282
313
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
283
314
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
284
315
|
editorAPP.setCurrentTool('geo')
|
|
316
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
285
317
|
},
|
|
286
318
|
star(v) {
|
|
287
319
|
this.styleProps('geo', 'geo').defaultValue = 'star'
|
|
@@ -290,6 +322,7 @@ export default {
|
|
|
290
322
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
291
323
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
292
324
|
editorAPP.setCurrentTool('geo')
|
|
325
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
293
326
|
},
|
|
294
327
|
|
|
295
328
|
xBox(v) {
|
|
@@ -299,6 +332,7 @@ export default {
|
|
|
299
332
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
300
333
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
301
334
|
editorAPP.setCurrentTool('geo')
|
|
335
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
302
336
|
},
|
|
303
337
|
checkBox(v) {
|
|
304
338
|
this.styleProps('geo', 'geo').defaultValue = 'check-box'
|
|
@@ -307,6 +341,7 @@ export default {
|
|
|
307
341
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
308
342
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
309
343
|
editorAPP.setCurrentTool('geo')
|
|
344
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
310
345
|
},
|
|
311
346
|
oval(v) {
|
|
312
347
|
this.styleProps('geo', 'geo').defaultValue = 'oval'
|
|
@@ -315,6 +350,7 @@ export default {
|
|
|
315
350
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
316
351
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
317
352
|
editorAPP.setCurrentTool('geo')
|
|
353
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
318
354
|
},
|
|
319
355
|
arrowLeft(v) {
|
|
320
356
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-left'
|
|
@@ -323,6 +359,7 @@ export default {
|
|
|
323
359
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
324
360
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
325
361
|
editorAPP.setCurrentTool('geo')
|
|
362
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
326
363
|
},
|
|
327
364
|
arrowRight(v) {
|
|
328
365
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-right'
|
|
@@ -331,6 +368,7 @@ export default {
|
|
|
331
368
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
332
369
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
333
370
|
editorAPP.setCurrentTool('geo')
|
|
371
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
334
372
|
},
|
|
335
373
|
arrowUp(v) {
|
|
336
374
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-up'
|
|
@@ -339,6 +377,7 @@ export default {
|
|
|
339
377
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
340
378
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
341
379
|
editorAPP.setCurrentTool('geo')
|
|
380
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
342
381
|
},
|
|
343
382
|
arrowDown(v) {
|
|
344
383
|
this.styleProps('geo', 'geo').defaultValue = 'arrow-down'
|
|
@@ -347,6 +386,7 @@ export default {
|
|
|
347
386
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
348
387
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
349
388
|
editorAPP.setCurrentTool('geo')
|
|
389
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
350
390
|
},
|
|
351
391
|
hexagon(v) {
|
|
352
392
|
this.styleProps('geo', 'geo').defaultValue = 'hexagon'
|
|
@@ -355,6 +395,7 @@ export default {
|
|
|
355
395
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
356
396
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
357
397
|
editorAPP.setCurrentTool('geo')
|
|
398
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
358
399
|
},
|
|
359
400
|
highlight(v) {
|
|
360
401
|
this.styleProps('geo', 'color').defaultValue = v?.color ?? 'black'
|
|
@@ -362,6 +403,7 @@ export default {
|
|
|
362
403
|
this.styleProps('geo', 'dash').defaultValue = v?.dash ?? 'draw'
|
|
363
404
|
this.styleProps('geo', 'fill').defaultValue = v?.fill ?? 'none'
|
|
364
405
|
editorAPP.setCurrentTool('highlight')
|
|
406
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
365
407
|
},
|
|
366
408
|
insertPicture(img) {
|
|
367
409
|
const assetId = AssetRecordType.createId()
|
|
@@ -396,6 +438,7 @@ export default {
|
|
|
396
438
|
},
|
|
397
439
|
laser() {
|
|
398
440
|
editorAPP.setCurrentTool('laser')
|
|
441
|
+
editorAPP.updateInstanceState({ isToolLocked: this.isToolLocked })
|
|
399
442
|
},
|
|
400
443
|
undo() {
|
|
401
444
|
editorAPP.undo()
|