zydx-plus 1.35.548 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.35.548",
3
+ "version": "1.35.549",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -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 @click.stop="extendRight(null)">链接扩展</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 @click.stop="extendRight(null)">链接扩展</p>
82
+ <p>链接扩展</p>
83
83
  </div>
84
84
  </div>
85
85
  <div class="textLayer" ref="textLayer">
@@ -154,15 +154,12 @@ export default {
154
154
  },
155
155
  handleMountedEditor(editor) {
156
156
  editorAPP = editor
157
- editorAPP.sideEffects.registerAfterChangeHandler('shape', (prev, next)=> {
157
+ editorAPP.sideEffects.registerAfterChangeHandler('shape', debounce((prev, next)=> {
158
158
  // there can only be one red shape at a time:
159
- console.log('shapeChangeHandler prev',prev)
160
- // console.log('shapeChangeHandler next',next)
161
159
  this.$emit('shapeChangeHandler', prev);
162
- })
160
+ },200) )
163
161
  editorAPP.sideEffects.registerAfterDeleteHandler('shape', (shape) => {
164
162
  // if the last shape in a frame is deleted, delete the frame too:
165
- console.log('shapeDeleteHandler',shape)
166
163
  this.$emit('shapeDeleteHandler', shape);
167
164
  })
168
165
  editorAPP.setCameraOptions({ isLocked: this.cameraIsLocked })
@@ -185,18 +182,25 @@ export default {
185
182
  // 清空
186
183
  clear() {
187
184
  // editorAPP.store.loadSnapshot(clearJson)
188
- editorAPP.selectAll()
189
- let graphicIds = editorAPP.getSelectedShapeIds()
185
+ editorAPP?.selectAll()
186
+ let graphicIds = editorAPP?.getSelectedShapeIds()
190
187
  // for(let key in editorAPP.store.query.atoms.current) {
191
188
  // if(key.split(':')[0]==='shape') {
192
189
  // graphicIds.push(key)
193
190
  // }
194
191
  // }
195
- editorAPP.deleteShapes(graphicIds)
192
+ editorAPP?.deleteShapes(graphicIds)
193
+ },
194
+ //
195
+ editorCreateShape(myShape){
196
+ editorAPP.createShape(myShape)
197
+ },
198
+ editorDeleteShape(shapeId){
199
+ editorAPP.deleteShape(shapeId)
196
200
  },
197
201
  // 添加快照
198
202
  setSnapshot(v) {
199
- editorAPP.store.loadSnapshot(v)
203
+ editorAPP.store?.loadSnapshot(v)
200
204
  this.isFocused()
201
205
  },
202
206
  // 获取快照
@@ -225,7 +229,6 @@ export default {
225
229
  },
226
230
  arrow(v) {
227
231
  // 'none', 'semi', 'solid', 'pattern'
228
- console.log('arrowarrowarrowarrowarrow');
229
232
  this.styleProps('arrow', 'color').defaultValue = v?.color ?? 'black'
230
233
  this.styleProps('arrow', 'size').defaultValue = v?.size ?? 'm'
231
234
  this.styleProps('arrow', 'dash').defaultValue = v?.dash ?? 'draw'
@@ -467,7 +470,7 @@ export default {
467
470
  isFocused() {
468
471
  const top = document.documentElement.scrollTop
469
472
  setTimeout(() => {
470
- editorAPP.updateInstanceState({isFocused: true})
473
+ editorAPP?.updateInstanceState({isFocused: true})
471
474
  document.documentElement.scrollTop = top
472
475
  }, 10)
473
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">
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.548',
92
+ version: '1.35.549',
93
93
  install,
94
94
  Calendar,
95
95
  Message,