@riil-frontend/component-topology 6.0.0-alpha.65 → 6.0.0-alpha.67

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.
@@ -34,6 +34,10 @@ function ColorPanel(props) {
34
34
  active = _useState2[0],
35
35
  setActive = _useState2[1];
36
36
 
37
+ var _useState3 = useState(false),
38
+ visible = _useState3[0],
39
+ setVisible = _useState3[1];
40
+
37
41
  var colorChange = function colorChange(value, type, key) {
38
42
  setActive(key);
39
43
  onChange(getColor16(value), type);
@@ -66,21 +70,7 @@ function ColorPanel(props) {
66
70
  };
67
71
 
68
72
  var handleChange = function handleChange(color) {
69
- var prevValue = color.hex;
70
- var rgb = color.rgb;
71
- var rgba = "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")";
72
-
73
- if (data !== prevValue) {
74
- setData({
75
- hex: prevValue,
76
- rgb: rgb
77
- });
78
- }
79
- };
80
-
81
- var pickerBlur = function pickerBlur() {
82
- onChange(data, 'change');
83
- onPickerBlur();
73
+ setData(color); // onChange(color,'change');
84
74
  };
85
75
 
86
76
  var getColor16 = function getColor16(color) {
@@ -118,11 +108,23 @@ function ColorPanel(props) {
118
108
  return that;
119
109
  };
120
110
 
111
+ var open = function open() {
112
+ setVisible(true);
113
+ onPickerFocus();
114
+ };
115
+
116
+ var close = function close() {
117
+ setVisible(false);
118
+ onPickerBlur();
119
+ onChange(data, 'select');
120
+ };
121
+
121
122
  var defaultTrigger = /*#__PURE__*/React.createElement("div", {
122
123
  className: styles.swatch,
123
124
  style: {
124
125
  background: value
125
- }
126
+ },
127
+ onClick: open
126
128
  }, /*#__PURE__*/React.createElement("img", {
127
129
  src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u66F4\u591A\u989C\u8272.svg",
128
130
  alt: ""
@@ -151,6 +153,7 @@ function ColorPanel(props) {
151
153
  changClick('17');
152
154
  }
153
155
  }, /*#__PURE__*/React.createElement(_Balloon, {
156
+ visible: visible,
154
157
  trigger: defaultTrigger,
155
158
  closable: false,
156
159
  triggerType: "click",
@@ -161,8 +164,7 @@ function ColorPanel(props) {
161
164
  style: {
162
165
  paddingBottom: 0
163
166
  },
164
- onBlur: pickerBlur,
165
- onFocus: onPickerFocus
167
+ onClose: close
166
168
  }, /*#__PURE__*/React.createElement(SketchPicker, {
167
169
  color: data // width={230}
168
170
  ,
@@ -268,14 +268,14 @@ var Topology = function Topology(props) {
268
268
  direction: "row",
269
269
  flex: 1,
270
270
  className: classnames((_classnames = {}, _classnames[editorStyles.borderLine] = isEditMode, _classnames))
271
- }, isEditMode && /*#__PURE__*/React.createElement(Sidebar, {
271
+ }, isEditMode && /*#__PURE__*/React.createElement(Sidebar, _extends({
272
272
  topo: topo,
273
273
  topoEdit: topoEdit,
274
274
  topoContext: {
275
275
  urlParams: urlParams
276
276
  },
277
277
  editorProps: editorProps
278
- }), renderCanvas(), isEditMode && graphLoaded && /*#__PURE__*/React.createElement(PropertyView, {
278
+ }, editorProps === null || editorProps === void 0 ? void 0 : editorProps.sidebarProps)), renderCanvas(), isEditMode && graphLoaded && /*#__PURE__*/React.createElement(PropertyView, {
279
279
  topo: topo,
280
280
  editorProps: editorProps
281
281
  })), !isEditMode && /*#__PURE__*/React.createElement(ViewerPlugin, {
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useEffect, useState } from 'react';
2
+ import React, { useEffect, useMemo } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import Tab from "../../../../components/VerticalIconTab";
5
5
  import panes from "./panes";
@@ -8,7 +8,8 @@ import styles from "./Sidebar.module.scss";
8
8
  function Sidebar(props) {
9
9
  var _classNames;
10
10
 
11
- var topo = props.topo;
11
+ var topo = props.topo,
12
+ getPanels = props.getPanels;
12
13
 
13
14
  var _topo$store$useModel = topo.store.useModel('topoEdit'),
14
15
  topoEditState = _topo$store$useModel[0],
@@ -19,6 +20,9 @@ function Sidebar(props) {
19
20
  var _topo$store$useModelS = topo.store.useModelState('topoMod'),
20
21
  graphLoaded = _topo$store$useModelS.graphLoaded;
21
22
 
23
+ var visiblePanels = useMemo(function () {
24
+ return getPanels ? getPanels(panes) : panes;
25
+ }, [getPanels]);
22
26
  useEffect(function () {
23
27
  return function () {
24
28
  // 退出编辑模式,关闭资源面板状态
@@ -63,7 +67,7 @@ function Sidebar(props) {
63
67
  resourceTabActiveKey: key
64
68
  });
65
69
  }
66
- }, panes.map(renderTabItem))));
70
+ }, visiblePanels.map(renderTabItem))));
67
71
  }
68
72
 
69
73
  export default Sidebar;
@@ -1,3 +1,6 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+
1
4
  /* eslint-disable jsx-a11y/alt-text */
2
5
  import React, { useState } from 'react';
3
6
  import DropdownButton from "./components/DropdownButton";
@@ -10,7 +13,8 @@ import textStyleSettingRouter from "./components/textStyleSetting/textStyleSetti
10
13
  function FontColorDropdown(props) {
11
14
  var onChange = props.onChange,
12
15
  topo = props.topo,
13
- opacity = props.opacity;
16
+ opacity = props.opacity,
17
+ setStyle = props.setStyle;
14
18
 
15
19
  var _useState = useState(false),
16
20
  disabled = _useState[0],
@@ -24,36 +28,90 @@ function FontColorDropdown(props) {
24
28
  topo.historyManager.endTransaction();
25
29
  };
26
30
 
27
- var colorBackgroundChanges = function colorBackgroundChanges(type, name, value) {
28
- if (type === 'select') topo.historyManager.beginTransaction();
29
-
30
- if (name === 'color') {
31
- onChange({
32
- color: value
33
- });
34
- } else {
35
- onChange({
36
- background: value
37
- });
38
- }
31
+ var colorChang = /*#__PURE__*/function () {
32
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, type) {
33
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
34
+ while (1) {
35
+ switch (_context.prev = _context.next) {
36
+ case 0:
37
+ if (!(type === 'select')) {
38
+ _context.next = 7;
39
+ break;
40
+ }
39
41
 
40
- if (type === 'select') topo.historyManager.endTransaction();
41
- };
42
+ topo.historyManager.beginTransaction();
43
+ _context.next = 4;
44
+ return setStyle({
45
+ color: value
46
+ });
42
47
 
43
- var colorChang = function colorChang(value, type) {
44
- colorBackgroundChanges(type, 'color', value);
45
- };
48
+ case 4:
49
+ topo.historyManager.endTransaction();
50
+ _context.next = 8;
51
+ break;
46
52
 
47
- var backgroundChang = function backgroundChang(value, type) {
48
- colorBackgroundChanges(type, 'background', value);
49
- };
53
+ case 7:
54
+ setStyle({
55
+ background: value
56
+ });
50
57
 
51
- var onFocus = function onFocus() {
52
- topo.historyManager.beginTransaction();
58
+ case 8:
59
+ case "end":
60
+ return _context.stop();
61
+ }
62
+ }
63
+ }, _callee);
64
+ }));
65
+
66
+ return function colorChang(_x, _x2) {
67
+ return _ref.apply(this, arguments);
68
+ };
69
+ }();
70
+
71
+ var backgroundChang = /*#__PURE__*/function () {
72
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, type) {
73
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
74
+ while (1) {
75
+ switch (_context2.prev = _context2.next) {
76
+ case 0:
77
+ if (!(type === 'select')) {
78
+ _context2.next = 7;
79
+ break;
80
+ }
81
+
82
+ topo.historyManager.beginTransaction();
83
+ _context2.next = 4;
84
+ return setStyle({
85
+ background: value
86
+ });
87
+
88
+ case 4:
89
+ topo.historyManager.endTransaction();
90
+ _context2.next = 8;
91
+ break;
92
+
93
+ case 7:
94
+ setStyle({
95
+ background: value
96
+ });
97
+
98
+ case 8:
99
+ case "end":
100
+ return _context2.stop();
101
+ }
102
+ }
103
+ }, _callee2);
104
+ }));
105
+
106
+ return function backgroundChang(_x3, _x4) {
107
+ return _ref2.apply(this, arguments);
108
+ };
109
+ }();
110
+
111
+ var onFocus = function onFocus() {// topo.historyManager.beginTransaction();
53
112
  };
54
113
 
55
- var onBlur = function onBlur() {
56
- topo.historyManager.endTransaction();
114
+ var onBlur = function onBlur() {// topo.historyManager.endTransaction();
57
115
  };
58
116
 
59
117
  var icon = disabled ? /*#__PURE__*/React.createElement("img", {
@@ -119,9 +177,9 @@ function FontColorButton(props) {
119
177
  color: style.color,
120
178
  background: style.background,
121
179
  opacity: style.opacity,
180
+ setStyle: setStyle,
122
181
  onChange: function onChange(val) {
123
182
  setStyle(val);
124
- topo.historyManager.endTransaction();
125
183
  },
126
184
  topo: topo
127
185
  }));
@@ -26,10 +26,6 @@ function DropdownButton(props) {
26
26
  }, buttonBoxProps), trigger);
27
27
 
28
28
  var renderContent = function renderContent() {
29
- if (!visible) {
30
- return /*#__PURE__*/React.createElement("div", null);
31
- }
32
-
33
29
  if (showContainer) {
34
30
  return /*#__PURE__*/React.createElement(PopupCard, null, children);
35
31
  }
@@ -1,7 +1,9 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
- var _excluded = ["color", "background", "opacity"];
4
- import { formatBackgroundRgbaColor, parseBackground } from "../ElementTextStyleSetting/colorUtil";
3
+ var _excluded = ["color", "background", "opacity"],
4
+ _excluded2 = ["color", "background", "opacity", "bold", "italic"];
5
+ import fontStyleUtil from "../../../../../settings/common/text/fontStyleUtil";
6
+ import { formatBackgroundRgbaColor, parseBackground, parseColor } from "../ElementTextStyleSetting/colorUtil";
5
7
  var defaultStyle = {
6
8
  color: '#AFB9C2',
7
9
  fontFamily: '微软雅黑'
@@ -29,12 +31,13 @@ export var setGlobalTagStyle = function setGlobalTagStyle(topo, styleData) {
29
31
 
30
32
  var globalEdgeTagStyle = _extends({}, nodeLabelStyle, defaultEdgeLabelStyle, style);
31
33
 
32
- topo.getHtTopo().setGlobalNodeLabelStyle(globalNodeLabelStyle);
33
- topo.getHtTopo().setGlobalEdgeTagStyle(globalEdgeTagStyle);
34
34
  displayConfigDispatchers.update({
35
35
  nodeLabelStyle: globalNodeLabelStyle,
36
36
  defaultEdgeLabelStyle: globalEdgeTagStyle
37
37
  });
38
+ var styles = setTextStyle(styleData, nodeLabelStyle);
39
+ topo.getHtTopo().setGlobalNodeLabelStyle(styles);
40
+ topo.getHtTopo().setGlobalEdgeTagStyle(styles);
38
41
  };
39
42
 
40
43
  function buildStyle(styleData, prevTagStyle) {
@@ -57,4 +60,40 @@ function buildStyle(styleData, prevTagStyle) {
57
60
  return style;
58
61
  }
59
62
 
63
+ function setTextStyle(styleData, nodeLabelStyle) {
64
+ var _fontStyleUtil$remove = fontStyleUtil.removeBoldItalic(styleData),
65
+ color = _fontStyleUtil$remove.color,
66
+ background = _fontStyleUtil$remove.background,
67
+ opacity = _fontStyleUtil$remove.opacity,
68
+ bold = _fontStyleUtil$remove.bold,
69
+ italic = _fontStyleUtil$remove.italic,
70
+ otherStyle = _objectWithoutPropertiesLoose(_fontStyleUtil$remove, _excluded2);
71
+
72
+ var tagStyle = _extends({}, otherStyle);
73
+
74
+ if ('color' in styleData) {
75
+ tagStyle.color = color.hex;
76
+ }
77
+
78
+ if ('bold' in styleData) {
79
+ tagStyle.fontBold = bold;
80
+ }
81
+
82
+ if ('italic' in styleData) {
83
+ tagStyle.fontItalic = italic;
84
+ }
85
+
86
+ if ('background' in styleData) {
87
+ // 背景颜色
88
+ var prevBackgroundStyle = parseBackground(nodeLabelStyle === null || nodeLabelStyle === void 0 ? void 0 : nodeLabelStyle.background);
89
+ tagStyle.background = formatBackgroundRgbaColor(prevBackgroundStyle, styleData);
90
+ }
91
+
92
+ if ('opacity' in styleData) {
93
+ tagStyle.opacity = opacity;
94
+ }
95
+
96
+ return tagStyle;
97
+ }
98
+
60
99
  export function setStyle() {}
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
23
23
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
24
24
  import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
25
25
 
26
- var version = typeof "6.0.0-alpha.65" === 'string' ? "6.0.0-alpha.65" : null;
26
+ var version = typeof "6.0.0-alpha.67" === 'string' ? "6.0.0-alpha.67" : null;
27
27
  console.info("\u62D3\u6251\u7248\u672C: " + version);
28
28
  /**
29
29
  * 拓扑显示和编辑
@@ -50,6 +50,10 @@ function ColorPanel(props) {
50
50
  active = _useState2[0],
51
51
  setActive = _useState2[1];
52
52
 
53
+ var _useState3 = (0, _react.useState)(false),
54
+ visible = _useState3[0],
55
+ setVisible = _useState3[1];
56
+
53
57
  var colorChange = function colorChange(value, type, key) {
54
58
  setActive(key);
55
59
  onChange(getColor16(value), type);
@@ -82,21 +86,7 @@ function ColorPanel(props) {
82
86
  };
83
87
 
84
88
  var handleChange = function handleChange(color) {
85
- var prevValue = color.hex;
86
- var rgb = color.rgb;
87
- var rgba = "rgba(" + rgb.r + "," + rgb.g + "," + rgb.b + "," + rgb.a + ")";
88
-
89
- if (data !== prevValue) {
90
- setData({
91
- hex: prevValue,
92
- rgb: rgb
93
- });
94
- }
95
- };
96
-
97
- var pickerBlur = function pickerBlur() {
98
- onChange(data, 'change');
99
- onPickerBlur();
89
+ setData(color); // onChange(color,'change');
100
90
  };
101
91
 
102
92
  var getColor16 = function getColor16(color) {
@@ -134,11 +124,23 @@ function ColorPanel(props) {
134
124
  return that;
135
125
  };
136
126
 
127
+ var open = function open() {
128
+ setVisible(true);
129
+ onPickerFocus();
130
+ };
131
+
132
+ var close = function close() {
133
+ setVisible(false);
134
+ onPickerBlur();
135
+ onChange(data, 'select');
136
+ };
137
+
137
138
  var defaultTrigger = /*#__PURE__*/_react["default"].createElement("div", {
138
139
  className: _indexModule["default"].swatch,
139
140
  style: {
140
141
  background: value
141
- }
142
+ },
143
+ onClick: open
142
144
  }, /*#__PURE__*/_react["default"].createElement("img", {
143
145
  src: "/img/topo/editor/toolbar/\u6587\u5B57\u989C\u8272\u53CA\u586B\u5145/\u66F4\u591A\u989C\u8272.svg",
144
146
  alt: ""
@@ -168,6 +170,7 @@ function ColorPanel(props) {
168
170
  changClick('17');
169
171
  }
170
172
  }, /*#__PURE__*/_react["default"].createElement(_balloon["default"], {
173
+ visible: visible,
171
174
  trigger: defaultTrigger,
172
175
  closable: false,
173
176
  triggerType: "click",
@@ -178,8 +181,7 @@ function ColorPanel(props) {
178
181
  style: {
179
182
  paddingBottom: 0
180
183
  },
181
- onBlur: pickerBlur,
182
- onFocus: onPickerFocus
184
+ onClose: close
183
185
  }, /*#__PURE__*/_react["default"].createElement(_reactColor.SketchPicker, {
184
186
  color: data // width={230}
185
187
  ,
@@ -310,14 +310,14 @@ var Topology = function Topology(props) {
310
310
  direction: "row",
311
311
  flex: 1,
312
312
  className: (0, _classnames2["default"])((_classnames = {}, _classnames[_editorModule["default"].borderLine] = isEditMode, _classnames))
313
- }, isEditMode && /*#__PURE__*/_react["default"].createElement(_Sidebar["default"], {
313
+ }, isEditMode && /*#__PURE__*/_react["default"].createElement(_Sidebar["default"], (0, _extends2["default"])({
314
314
  topo: topo,
315
315
  topoEdit: topoEdit,
316
316
  topoContext: {
317
317
  urlParams: urlParams
318
318
  },
319
319
  editorProps: editorProps
320
- }), renderCanvas(), isEditMode && graphLoaded && /*#__PURE__*/_react["default"].createElement(_PropertyView["default"], {
320
+ }, editorProps === null || editorProps === void 0 ? void 0 : editorProps.sidebarProps)), renderCanvas(), isEditMode && graphLoaded && /*#__PURE__*/_react["default"].createElement(_PropertyView["default"], {
321
321
  topo: topo,
322
322
  editorProps: editorProps
323
323
  })), !isEditMode && /*#__PURE__*/_react["default"].createElement(_ViewerPlugin["default"], {
@@ -24,7 +24,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
24
24
  function Sidebar(props) {
25
25
  var _classNames;
26
26
 
27
- var topo = props.topo;
27
+ var topo = props.topo,
28
+ getPanels = props.getPanels;
28
29
 
29
30
  var _topo$store$useModel = topo.store.useModel('topoEdit'),
30
31
  topoEditState = _topo$store$useModel[0],
@@ -35,6 +36,9 @@ function Sidebar(props) {
35
36
  var _topo$store$useModelS = topo.store.useModelState('topoMod'),
36
37
  graphLoaded = _topo$store$useModelS.graphLoaded;
37
38
 
39
+ var visiblePanels = (0, _react.useMemo)(function () {
40
+ return getPanels ? getPanels(_panes["default"]) : _panes["default"];
41
+ }, [getPanels]);
38
42
  (0, _react.useEffect)(function () {
39
43
  return function () {
40
44
  // 退出编辑模式,关闭资源面板状态
@@ -79,7 +83,7 @@ function Sidebar(props) {
79
83
  resourceTabActiveKey: key
80
84
  });
81
85
  }
82
- }, _panes["default"].map(renderTabItem))));
86
+ }, visiblePanels.map(renderTabItem))));
83
87
  }
84
88
 
85
89
  var _default = Sidebar;
@@ -5,6 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports["default"] = void 0;
7
7
 
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+
10
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
+
8
12
  var _react = _interopRequireWildcard(require("react"));
9
13
 
10
14
  var _DropdownButton = _interopRequireDefault(require("./components/DropdownButton"));
@@ -27,7 +31,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
31
  function FontColorDropdown(props) {
28
32
  var onChange = props.onChange,
29
33
  topo = props.topo,
30
- opacity = props.opacity;
34
+ opacity = props.opacity,
35
+ setStyle = props.setStyle;
31
36
 
32
37
  var _useState = (0, _react.useState)(false),
33
38
  disabled = _useState[0],
@@ -41,36 +46,90 @@ function FontColorDropdown(props) {
41
46
  topo.historyManager.endTransaction();
42
47
  };
43
48
 
44
- var colorBackgroundChanges = function colorBackgroundChanges(type, name, value) {
45
- if (type === 'select') topo.historyManager.beginTransaction();
46
-
47
- if (name === 'color') {
48
- onChange({
49
- color: value
50
- });
51
- } else {
52
- onChange({
53
- background: value
54
- });
55
- }
56
-
57
- if (type === 'select') topo.historyManager.endTransaction();
58
- };
59
-
60
- var colorChang = function colorChang(value, type) {
61
- colorBackgroundChanges(type, 'color', value);
49
+ var colorChang = /*#__PURE__*/function () {
50
+ var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(value, type) {
51
+ return _regenerator["default"].wrap(function _callee$(_context) {
52
+ while (1) {
53
+ switch (_context.prev = _context.next) {
54
+ case 0:
55
+ if (!(type === 'select')) {
56
+ _context.next = 7;
57
+ break;
58
+ }
59
+
60
+ topo.historyManager.beginTransaction();
61
+ _context.next = 4;
62
+ return setStyle({
63
+ color: value
64
+ });
65
+
66
+ case 4:
67
+ topo.historyManager.endTransaction();
68
+ _context.next = 8;
69
+ break;
70
+
71
+ case 7:
72
+ setStyle({
73
+ background: value
74
+ });
75
+
76
+ case 8:
77
+ case "end":
78
+ return _context.stop();
79
+ }
80
+ }
81
+ }, _callee);
82
+ }));
83
+
84
+ return function colorChang(_x, _x2) {
85
+ return _ref.apply(this, arguments);
86
+ };
87
+ }();
88
+
89
+ var backgroundChang = /*#__PURE__*/function () {
90
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(value, type) {
91
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
92
+ while (1) {
93
+ switch (_context2.prev = _context2.next) {
94
+ case 0:
95
+ if (!(type === 'select')) {
96
+ _context2.next = 7;
97
+ break;
98
+ }
99
+
100
+ topo.historyManager.beginTransaction();
101
+ _context2.next = 4;
102
+ return setStyle({
103
+ background: value
104
+ });
105
+
106
+ case 4:
107
+ topo.historyManager.endTransaction();
108
+ _context2.next = 8;
109
+ break;
110
+
111
+ case 7:
112
+ setStyle({
113
+ background: value
114
+ });
115
+
116
+ case 8:
117
+ case "end":
118
+ return _context2.stop();
119
+ }
120
+ }
121
+ }, _callee2);
122
+ }));
123
+
124
+ return function backgroundChang(_x3, _x4) {
125
+ return _ref2.apply(this, arguments);
126
+ };
127
+ }();
128
+
129
+ var onFocus = function onFocus() {// topo.historyManager.beginTransaction();
62
130
  };
63
131
 
64
- var backgroundChang = function backgroundChang(value, type) {
65
- colorBackgroundChanges(type, 'background', value);
66
- };
67
-
68
- var onFocus = function onFocus() {
69
- topo.historyManager.beginTransaction();
70
- };
71
-
72
- var onBlur = function onBlur() {
73
- topo.historyManager.endTransaction();
132
+ var onBlur = function onBlur() {// topo.historyManager.endTransaction();
74
133
  };
75
134
 
76
135
  var icon = disabled ? /*#__PURE__*/_react["default"].createElement("img", {
@@ -136,9 +195,9 @@ function FontColorButton(props) {
136
195
  color: style.color,
137
196
  background: style.background,
138
197
  opacity: style.opacity,
198
+ setStyle: setStyle,
139
199
  onChange: function onChange(val) {
140
200
  setStyle(val);
141
- topo.historyManager.endTransaction();
142
201
  },
143
202
  topo: topo
144
203
  }));
@@ -42,10 +42,6 @@ function DropdownButton(props) {
42
42
  }, buttonBoxProps), trigger);
43
43
 
44
44
  var renderContent = function renderContent() {
45
- if (!visible) {
46
- return /*#__PURE__*/_react["default"].createElement("div", null);
47
- }
48
-
49
45
  if (showContainer) {
50
46
  return /*#__PURE__*/_react["default"].createElement(PopupCard, null, children);
51
47
  }