@riil-frontend/component-topology 6.0.0-alpha.52 → 6.0.0-alpha.53
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/build/index.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/FontStyleButton.js +5 -1
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +16 -11
- package/es/core/models/TopoApp.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/FontStyleButton.js +5 -1
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/NodeAlignWidget.js +16 -11
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
@@ -114,7 +114,11 @@ function FontStyleButton(props) {
|
|
114
114
|
}, /*#__PURE__*/React.createElement("img", {
|
115
115
|
src: "/img/topo/editor/toolbar/" + item.icon + "/Normal.svg",
|
116
116
|
alt: ""
|
117
|
-
}), /*#__PURE__*/React.createElement("span",
|
117
|
+
}), /*#__PURE__*/React.createElement("span", {
|
118
|
+
style: {
|
119
|
+
color: '#4d6277 !important'
|
120
|
+
}
|
121
|
+
}, item.label)));
|
118
122
|
})));
|
119
123
|
}
|
120
124
|
|
@@ -47,14 +47,18 @@ function NodeAlignWidget(props) {
|
|
47
47
|
topo.historyManager.endTransaction();
|
48
48
|
};
|
49
49
|
|
50
|
-
var leftInputChange = function leftInputChange(
|
51
|
-
setLeftInputVal(
|
52
|
-
setSpace('h',
|
50
|
+
var leftInputChange = function leftInputChange(val) {
|
51
|
+
setLeftInputVal(val);
|
52
|
+
setSpace('h', val);
|
53
53
|
};
|
54
54
|
|
55
|
-
var rightInputChange = function rightInputChange(
|
56
|
-
setRightInputVal(
|
57
|
-
setSpace('v',
|
55
|
+
var rightInputChange = function rightInputChange(val) {
|
56
|
+
setRightInputVal(val);
|
57
|
+
setSpace('v', val);
|
58
|
+
};
|
59
|
+
|
60
|
+
var parseValue = function parseValue(v) {
|
61
|
+
return v * 1 > 0 ? Math.round(v) : '';
|
58
62
|
};
|
59
63
|
|
60
64
|
useEffect(function () {
|
@@ -72,8 +76,8 @@ function NodeAlignWidget(props) {
|
|
72
76
|
if (nodes.length === 2) {
|
73
77
|
var h = topo.view.topoClient.htTopoClient.getElementsSpace(nodes, 'h')[0];
|
74
78
|
var v = topo.view.topoClient.htTopoClient.getElementsSpace(nodes, 'v')[0];
|
75
|
-
setLeftInputVal(
|
76
|
-
setRightInputVal(
|
79
|
+
setLeftInputVal(parseValue(h));
|
80
|
+
setRightInputVal(parseValue(v));
|
77
81
|
}
|
78
82
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
79
83
|
|
@@ -104,7 +108,7 @@ function NodeAlignWidget(props) {
|
|
104
108
|
disabled: disabled,
|
105
109
|
size: "small",
|
106
110
|
hasTrigger: false,
|
107
|
-
placeholder:
|
111
|
+
placeholder: distributionDisabled ? '' : '多个值',
|
108
112
|
className: styles.leftInput,
|
109
113
|
value: leftInputVal,
|
110
114
|
min: 0,
|
@@ -113,8 +117,9 @@ function NodeAlignWidget(props) {
|
|
113
117
|
}), /*#__PURE__*/React.createElement(_NumberPicker, {
|
114
118
|
disabled: disabled,
|
115
119
|
size: "small",
|
116
|
-
hasTrigger: false
|
117
|
-
|
120
|
+
hasTrigger: false // eslint-disable-next-line no-nested-ternary
|
121
|
+
,
|
122
|
+
placeholder: distributionDisabled ? '' : '多个值',
|
118
123
|
className: styles.rightInput,
|
119
124
|
value: rightInputVal,
|
120
125
|
min: 0,
|
@@ -22,7 +22,7 @@ import topoFactory from "./topoFactory";
|
|
22
22
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
23
23
|
import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
|
24
24
|
|
25
|
-
var version = typeof "6.0.0-alpha.
|
25
|
+
var version = typeof "6.0.0-alpha.53" === 'string' ? "6.0.0-alpha.53" : null;
|
26
26
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
27
27
|
/**
|
28
28
|
* 拓扑显示和编辑
|
@@ -131,7 +131,11 @@ function FontStyleButton(props) {
|
|
131
131
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
132
132
|
src: "/img/topo/editor/toolbar/" + item.icon + "/Normal.svg",
|
133
133
|
alt: ""
|
134
|
-
}), /*#__PURE__*/_react["default"].createElement("span",
|
134
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
135
|
+
style: {
|
136
|
+
color: '#4d6277 !important'
|
137
|
+
}
|
138
|
+
}, item.label)));
|
135
139
|
})));
|
136
140
|
}
|
137
141
|
|
@@ -61,7 +61,7 @@ function Layout(props) {
|
|
61
61
|
} // eslint-disable-next-line eqeqeq
|
62
62
|
|
63
63
|
|
64
|
-
if ((0, _htElementDataUtil.isLayer)(firstElement)) {
|
64
|
+
if (firstElement && (0, _htElementDataUtil.isLayer)(firstElement)) {
|
65
65
|
topo.getHtTopo().layoutLayer(selectionElements[0]);
|
66
66
|
}
|
67
67
|
};
|
@@ -66,14 +66,18 @@ function NodeAlignWidget(props) {
|
|
66
66
|
topo.historyManager.endTransaction();
|
67
67
|
};
|
68
68
|
|
69
|
-
var leftInputChange = function leftInputChange(
|
70
|
-
setLeftInputVal(
|
71
|
-
setSpace('h',
|
69
|
+
var leftInputChange = function leftInputChange(val) {
|
70
|
+
setLeftInputVal(val);
|
71
|
+
setSpace('h', val);
|
72
72
|
};
|
73
73
|
|
74
|
-
var rightInputChange = function rightInputChange(
|
75
|
-
setRightInputVal(
|
76
|
-
setSpace('v',
|
74
|
+
var rightInputChange = function rightInputChange(val) {
|
75
|
+
setRightInputVal(val);
|
76
|
+
setSpace('v', val);
|
77
|
+
};
|
78
|
+
|
79
|
+
var parseValue = function parseValue(v) {
|
80
|
+
return v * 1 > 0 ? Math.round(v) : '';
|
77
81
|
};
|
78
82
|
|
79
83
|
(0, _react.useEffect)(function () {
|
@@ -91,8 +95,8 @@ function NodeAlignWidget(props) {
|
|
91
95
|
if (nodes.length === 2) {
|
92
96
|
var h = topo.view.topoClient.htTopoClient.getElementsSpace(nodes, 'h')[0];
|
93
97
|
var v = topo.view.topoClient.htTopoClient.getElementsSpace(nodes, 'v')[0];
|
94
|
-
setLeftInputVal(
|
95
|
-
setRightInputVal(
|
98
|
+
setLeftInputVal(parseValue(h));
|
99
|
+
setRightInputVal(parseValue(v));
|
96
100
|
}
|
97
101
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
98
102
|
|
@@ -123,7 +127,7 @@ function NodeAlignWidget(props) {
|
|
123
127
|
disabled: disabled,
|
124
128
|
size: "small",
|
125
129
|
hasTrigger: false,
|
126
|
-
placeholder:
|
130
|
+
placeholder: distributionDisabled ? '' : '多个值',
|
127
131
|
className: _NodeAlignWidgetModule["default"].leftInput,
|
128
132
|
value: leftInputVal,
|
129
133
|
min: 0,
|
@@ -132,8 +136,9 @@ function NodeAlignWidget(props) {
|
|
132
136
|
}), /*#__PURE__*/_react["default"].createElement(_numberPicker["default"], {
|
133
137
|
disabled: disabled,
|
134
138
|
size: "small",
|
135
|
-
hasTrigger: false
|
136
|
-
|
139
|
+
hasTrigger: false // eslint-disable-next-line no-nested-ternary
|
140
|
+
,
|
141
|
+
placeholder: distributionDisabled ? '' : '多个值',
|
137
142
|
className: _NodeAlignWidgetModule["default"].rightInput,
|
138
143
|
value: rightInputVal,
|
139
144
|
min: 0,
|
@@ -52,7 +52,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
52
52
|
var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
53
53
|
|
54
54
|
// eslint-disable-next-line no-undef
|
55
|
-
var version = typeof "6.0.0-alpha.
|
55
|
+
var version = typeof "6.0.0-alpha.53" === 'string' ? "6.0.0-alpha.53" : null;
|
56
56
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
57
57
|
/**
|
58
58
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "6.0.0-alpha.
|
3
|
+
"version": "6.0.0-alpha.53",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@6.0.0-alpha.53/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|