@zhangqingcq/vgce 0.1.34 → 0.1.35

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": "@zhangqingcq/vgce",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "Vector graphics configure editor. svg组态编辑器。基于vue3.3+ts+element-plus+vite",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,10 +35,12 @@
35
35
  vueComp?: Record<string, any>
36
36
  data?: IDataModel
37
37
  canvasDrag?: boolean
38
+ canvasZoom?: boolean
38
39
  showCanvasInfo?: boolean
39
40
  }>(),
40
41
  {
41
42
  canvasDrag: true,
43
+ canvasZoom: true,
42
44
  showCanvasInfo: true
43
45
  }
44
46
  )
@@ -139,6 +141,9 @@
139
141
  }
140
142
 
141
143
  function onMousewheel(e: any) {
144
+ if (!props.canvasZoom) {
145
+ return
146
+ }
142
147
  if (e?.wheelDelta) {
143
148
  if (e.wheelDelta > 0) {
144
149
  preview_data.config.svg.scale = myFixed(preview_data.config.svg.scale + 0.1, 1)