wafer-map 4.0.34 → 4.0.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/README.md +46 -45
- package/README.zh-CN.md +42 -41
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,51 +40,52 @@ SVG Map for react
|
|
|
40
40
|
|
|
41
41
|
## Props
|
|
42
42
|
|
|
43
|
-
| Prop |
|
|
44
|
-
|
|
45
|
-
| mapId |
|
|
46
|
-
| componentWidth | `1920`
|
|
47
|
-
| componentHeight | `1080`
|
|
48
|
-
| background | `#ddd`
|
|
49
|
-
| visibleElement | `[]`
|
|
50
|
-
| visibleType | `[]`
|
|
51
|
-
| visibleState | `[]`
|
|
52
|
-
| clickableElement | `[]`
|
|
53
|
-
| clickableType | `[]`
|
|
54
|
-
| clickableState | `[]`
|
|
55
|
-
| onClick |
|
|
56
|
-
| onSelect |
|
|
57
|
-
| onClickError |
|
|
58
|
-
| mapZoom | `true`
|
|
59
|
-
| mapMove | `true`
|
|
60
|
-
| multiple | `false`
|
|
61
|
-
| noName | `false`
|
|
62
|
-
| showPath | `false`
|
|
63
|
-
| markId |
|
|
64
|
-
| showStateIds |
|
|
65
|
-
| reloadMap |
|
|
66
|
-
| reloadFinish |
|
|
67
|
-
| touchable |
|
|
68
|
-
| deleteId |
|
|
69
|
-
| deleteFinish |
|
|
70
|
-
| tooltipContent |
|
|
71
|
-
| elementsColor |
|
|
72
|
-
| pathStartSvg |
|
|
73
|
-
| pathEndSvg |
|
|
74
|
-
| pathStyle |
|
|
75
|
-
| markSvg |
|
|
76
|
-
| selectedSvg |
|
|
77
|
-
| defaultTooltipKey |
|
|
78
|
-
| getSvgDom |
|
|
79
|
-
| signatureKey | null
|
|
80
|
-
| restfulSignature | false
|
|
81
|
-
| textColor | #fff
|
|
82
|
-
|scaleFactorMax|5|false |maximum amount of scale a user can zoom in to
|
|
83
|
-
|scaleFactorMin |0.5|false | minimum amount of scale a user can zoom out of
|
|
84
|
-
| isGenders | `false`
|
|
85
|
-
|centerEleRate| 1
|
|
86
|
-
|centerElement | {}
|
|
87
|
-
|clickToCenter| {}
|
|
43
|
+
| Prop | default value | is required | description |
|
|
44
|
+
|--------|---------------|---------------|---------------|
|
|
45
|
+
| mapId | | true | map id |
|
|
46
|
+
| componentWidth | `1920` | false | Map the width of containers |
|
|
47
|
+
| componentHeight | `1080` | false | Map the height of containers |
|
|
48
|
+
| background | `#ddd` | false | Map container background color |
|
|
49
|
+
| visibleElement | `[]` | false | Displayable collection of element ids |
|
|
50
|
+
| visibleType | `[]` | false | Displayable collection of element types |
|
|
51
|
+
| visibleState | `[]` | false | Displayable collection of element states |
|
|
52
|
+
| clickableElement | `[]` |false| Clickable collection of element ids |
|
|
53
|
+
| clickableType | `[]` | false | Clickable collection of element types |
|
|
54
|
+
| clickableState | `[]` | false | Clickable collection of element states |
|
|
55
|
+
| onClick | | false | Radio callback method |
|
|
56
|
+
| onSelect | | false | Multi-select callback method |
|
|
57
|
+
| onClickError | | false | Select the callback method for the exception |
|
|
58
|
+
| mapZoom | `true` | false | Scale the map |
|
|
59
|
+
| mapMove | `true` | false | Move the map |
|
|
60
|
+
| multiple | `false` | false | Multiple switch |
|
|
61
|
+
| noName | `false` | false | Element names are not displayed on the map. |
|
|
62
|
+
| showPath | `false` | false | Display roadmap |
|
|
63
|
+
| markId | | false | The element id that needs to be tagged, such as '1'; If multiple, use string array format, such as ['1', '2'] |
|
|
64
|
+
| showStateIds | [] | false | Display different states of different elements, data structure:[{id: 1, state: 'XX', color: '#fff', text: ''}, {}] |
|
|
65
|
+
| reloadMap | | false | Reload the map |
|
|
66
|
+
| reloadFinish | | false | Reload the map to complete the callback |
|
|
67
|
+
| touchable | | false | Touch control |
|
|
68
|
+
| deleteId | | false | Delete selected element id |
|
|
69
|
+
| deleteFinish | | false | Callback after deleting selected element |
|
|
70
|
+
| tooltipContent | | false | Display tooltip |
|
|
71
|
+
| elementsColor | [] | false | Set color according to element id, data structure:[{id: 1, color: '#fff'}, {}] |
|
|
72
|
+
| pathStartSvg | | false | Guide start icon, this icon contains only elements inside svg, without svg tags |
|
|
73
|
+
| pathEndSvg | | false | Guide end icon, this icon contains only elements inside svg, without svg tags |
|
|
74
|
+
| pathStyle | | false | Guide leader style, style setting reference svg element attributes |
|
|
75
|
+
| markSvg | | false | Search anchor or mark icon, this icon contains only elements inside svg, without svg tags |
|
|
76
|
+
| selectedSvg | | false | Check icon, this icon contains only elements inside svg, without svg tags |
|
|
77
|
+
| defaultTooltipKey | | '' | You can customize the default key in the bubble, such as orgName |
|
|
78
|
+
| getSvgDom | | '' | Get viewerdom of SVG callback method |
|
|
79
|
+
| signatureKey | null | false | Signature key |
|
|
80
|
+
| restfulSignature | false | false | Controls whether to sign or not, when set to true, the signature key must be set to a valid value |
|
|
81
|
+
| textColor | #fff | false | elements text color |
|
|
82
|
+
|scaleFactorMax| 5 |false |maximum amount of scale a user can zoom in to
|
|
83
|
+
|scaleFactorMin | 0.5 |false | minimum amount of scale a user can zoom out of
|
|
84
|
+
| isGenders | `false` | false | Display male and female outsourcing type avatars before the name of the material |
|
|
85
|
+
|centerEleRate| 1 |false | Set the center material magnification
|
|
86
|
+
|centerElement | {} |false | Set the central material
|
|
87
|
+
|clickToCenter| {} |false | If set true when you click element will set it to center and zoom bigger.
|
|
88
|
+
|windowsTouchSupport| false |false | Whether Windows touch screen is supported.
|
|
88
89
|
|
|
89
90
|
|
|
90
91
|
|
package/README.zh-CN.md
CHANGED
|
@@ -40,50 +40,51 @@
|
|
|
40
40
|
|
|
41
41
|
## 参数
|
|
42
42
|
|
|
43
|
-
| 参数 |
|
|
44
|
-
|
|
45
|
-
| mapId |
|
|
46
|
-
| componentWidth | `1920`
|
|
47
|
-
| componentHeight | `1080`
|
|
48
|
-
| background | `#ddd`
|
|
49
|
-
| visibleElement | `[]`
|
|
50
|
-
| visibleType | `[]`
|
|
51
|
-
| visibleState | `[]`
|
|
52
|
-
| clickableElement | `[]`
|
|
53
|
-
| clickableType | `[]`
|
|
54
|
-
| clickableState | `[]`
|
|
55
|
-
| onClick |
|
|
56
|
-
| onSelect |
|
|
57
|
-
| onClickError |
|
|
58
|
-
| mapZoom | `true`
|
|
59
|
-
| mapMove | `true`
|
|
43
|
+
| 参数 | 默认值 | 是否必须 | 说明 |
|
|
44
|
+
|--------|---------|---------------|---------------|
|
|
45
|
+
| mapId | | true | 地图id |
|
|
46
|
+
| componentWidth | `1920` | false | 地图容器的宽度 |
|
|
47
|
+
| componentHeight | `1080` | false | 地图容器的高度 |
|
|
48
|
+
| background | `#ddd` | false | 地图容器的背景色 |
|
|
49
|
+
| visibleElement | `[]` | false | 可显示的元素id集合 |
|
|
50
|
+
| visibleType | `[]` | false | 可显示的元素类型集合 |
|
|
51
|
+
| visibleState | `[]` | false | 可显示的元素状态集合 |
|
|
52
|
+
| clickableElement | `[]` |false| 可点击的元素id集合 |
|
|
53
|
+
| clickableType | `[]` | false | 可点击的元素类型集合 |
|
|
54
|
+
| clickableState | `[]` | false | 可点击的元素状态集合 |
|
|
55
|
+
| onClick | | false | 单选回调方法 |
|
|
56
|
+
| onSelect | | false | 多选回调方法 |
|
|
57
|
+
| onClickError | | false | 不可点击事件回调方法 |
|
|
58
|
+
| mapZoom | `true` | false | 地图是否可以缩放 |
|
|
59
|
+
| mapMove | `true` | false | 地图是否可以移动 |
|
|
60
60
|
| multiple | `false` | false | 是否可以多选 |
|
|
61
61
|
| noName | `false` | false | 不显示元素上名称 |
|
|
62
62
|
| showPath | `false` | false | 是否显示导引线 |
|
|
63
|
-
| markId |
|
|
64
|
-
| showStateIds |
|
|
65
|
-
| reloadMap |
|
|
66
|
-
| reloadFinish |
|
|
67
|
-
| touchable |
|
|
68
|
-
| deleteId |
|
|
69
|
-
| deleteFinish |
|
|
70
|
-
| tooltipContent |
|
|
71
|
-
| elementsColor |
|
|
72
|
-
| pathStartSvg |
|
|
73
|
-
| pathEndSvg |
|
|
74
|
-
| pathStyle |
|
|
75
|
-
| markSvg |
|
|
76
|
-
| selectedSvg |
|
|
77
|
-
| defaultTooltipKey |
|
|
78
|
-
| getSvgDom |
|
|
79
|
-
| signatureKey | null
|
|
80
|
-
| restfulSignature | false
|
|
81
|
-
| textColor | #fff
|
|
82
|
-
|scaleFactorMax|5|false |maximum amount of scale a user can zoom in to
|
|
83
|
-
|scaleFactorMin |0.5|false | minimum amount of scale a user can zoom out of
|
|
84
|
-
|centerEleRate| 1
|
|
85
|
-
|centerElement | {}
|
|
86
|
-
|clickToCenter| {}
|
|
63
|
+
| markId | | false | 被查询或标记的元素id,如: '1'; 如果是多个,可使用字符串数组格式,如 ['1', '2'] |
|
|
64
|
+
| showStateIds | [] | false | 显示不同元素的不同状态,数据结构:[{id: 1, state: 'XX', color: '#fff', text: ''}, {}] |
|
|
65
|
+
| reloadMap | | false | 重新加载地图 |
|
|
66
|
+
| reloadFinish | | false | 地图加载完成回调 |
|
|
67
|
+
| touchable | | false | 可触摸控制 |
|
|
68
|
+
| deleteId | | false | 删除已选的元素id |
|
|
69
|
+
| deleteFinish | | false | 删除已选元素后的回调 |
|
|
70
|
+
| tooltipContent | | false | 鼠标悬浮在素材上的小气泡内容和样式 |
|
|
71
|
+
| elementsColor | [] | false | 按照元素id设置颜色,数据结构:[{id: 1, color: '#fff'}, {}] |
|
|
72
|
+
| pathStartSvg | | false | 导引线开始图标, 此图标仅包含 svg 内部的元素, 不包含 svg 标签; |
|
|
73
|
+
| pathEndSvg | | false | 导引线结束图标, 此图标仅包含 svg 内部的元素, 不包含 svg 标签; |
|
|
74
|
+
| pathStyle | | false | 导引线引线样式, 样式设置参考 svg 元素属性 |
|
|
75
|
+
| markSvg | | false | 搜索定位或标记图标, 此图标仅包含 svg 内部的元素, 不包含 svg 标签; |
|
|
76
|
+
| selectedSvg | | false | 选中图标,此图标仅包含 svg 内部的元素, 不包含 svg 标签; |
|
|
77
|
+
| defaultTooltipKey | | '' | 气泡里面 可以自定义默认显示取的key,如orgName |
|
|
78
|
+
| getSvgDom | | false | 获取svg的ViewerDOM回调方法 |
|
|
79
|
+
| signatureKey | null | false | 签名的key |
|
|
80
|
+
| restfulSignature | false | false | 控制是否签名,当设置为true时,签名key必须设置有效值 |
|
|
81
|
+
| textColor | #fff | false | 元素显示文字颜色 |
|
|
82
|
+
|scaleFactorMax| 5 |false |maximum amount of scale a user can zoom in to
|
|
83
|
+
|scaleFactorMin | 0.5 |false | minimum amount of scale a user can zoom out of
|
|
84
|
+
|centerEleRate| 1 |false | 设置中心素材放大倍数
|
|
85
|
+
|centerElement | {} |false | 设置中心素材
|
|
86
|
+
|clickToCenter| {} |false | 点击素材剧中放大
|
|
87
|
+
|clickToCenter| false |false | 是否支持 windows 触摸屏
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
|