sense-react-timeline-editor 1.0.16 → 1.0.18

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/dist/index.esm.js CHANGED
@@ -2000,7 +2000,7 @@ var Cursor = function Cursor(_ref) {
2000
2000
  }) - scrollLeft);
2001
2001
  }
2002
2002
  }, [cursorTime, startLeft, scaleWidth, scale, scrollLeft], {
2003
- wait: 800
2003
+ wait: 10
2004
2004
  });
2005
2005
  var clientHeight = ((_document$querySelect = document.querySelector("#time-editor-container")) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientHeight) || 0;
2006
2006
  return /*#__PURE__*/React.createElement(RowDnd, {
@@ -3211,7 +3211,7 @@ var useRowSelection = function useRowSelection(options) {
3211
3211
  var handleClickOutside = useCallback(function (target) {
3212
3212
  if (disabled) return;
3213
3213
  // 如果点击的不是选中的 action 或框选框,清除选择
3214
- if (!target.closest('.timeline-editor-selection-box') && !target.closest('.timeline-editor-action') && !target.closest('[data-draggable="true"]') && !target.closest('.voice-studio-right-config-panel') && !target.closest('.voice-studio-main-content-panel')) {
3214
+ if (!target.closest('.timeline-editor-selection-box') && !target.closest('.timeline-editor-action') && !target.closest('[data-draggable="true"]') && !target.closest('.voice-studio-right-config-panel') && !target.closest('.voice-studio-main-content-panel') && !target.closest('.ant-modal')) {
3215
3215
  clearSelection();
3216
3216
  }
3217
3217
  }, [disabled, clearSelection]);
@@ -3927,9 +3927,13 @@ var EditAreaO = /*#__PURE__*/React.forwardRef(function (props, ref) {
3927
3927
  // 监听 Ctrl+ 点击事件
3928
3928
  useEffect(function () {
3929
3929
  var handleCtrlClickAction = function handleCtrlClickAction(e) {
3930
+ var _editorData$;
3930
3931
  var _e$detail = e.detail,
3931
3932
  actionId = _e$detail.actionId,
3932
3933
  row = _e$detail.row;
3934
+ if (row.type !== ((_editorData$ = editorData[0]) === null || _editorData$ === void 0 ? void 0 : _editorData$.type)) {
3935
+ return;
3936
+ }
3933
3937
  console.log('ctrl-click-action', row, ', editorData = ', editorData);
3934
3938
  setSelectedActionIds(function (ids) {
3935
3939
  var newIds = new Set();
@@ -4238,12 +4242,16 @@ var TimeArea = function TimeArea(_ref) {
4238
4242
  height = _ref3.height;
4239
4243
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Grid, {
4240
4244
  ref: gridRef,
4245
+ containerStyle: {
4246
+ width: timelineWidth + 10,
4247
+ maxWidth: timelineWidth + 10
4248
+ },
4241
4249
  columnCount: showUnit ? scaleCount * scaleSplitCount + 1 : scaleCount,
4242
4250
  columnWidth: getColumnWidth,
4243
4251
  estimatedColumnSize: estColumnWidth,
4244
4252
  rowCount: 1,
4245
4253
  rowHeight: height,
4246
- width: timelineWidth,
4254
+ width: timelineWidth + 10,
4247
4255
  // width={width}
4248
4256
  height: height,
4249
4257
  overscanRowCount: 0,
@@ -4483,7 +4491,7 @@ var Timeline = /*#__PURE__*/React.forwardRef(function (props, ref) {
4483
4491
  if (areaRef.current) {
4484
4492
  var resizeObserver = new ResizeObserver(function () {
4485
4493
  if (!areaRef.current) return;
4486
- setWidth(areaRef.current.getBoundingClientRect().width);
4494
+ setWidth(areaRef.current.getBoundingClientRect().width + 10);
4487
4495
  });
4488
4496
  resizeObserver.observe(areaRef.current);
4489
4497
  return function () {
package/dist/index.js CHANGED
@@ -2009,7 +2009,7 @@ var Cursor = function Cursor(_ref) {
2009
2009
  }) - scrollLeft);
2010
2010
  }
2011
2011
  }, [cursorTime, startLeft, scaleWidth, scale, scrollLeft], {
2012
- wait: 800
2012
+ wait: 10
2013
2013
  });
2014
2014
  var clientHeight = ((_document$querySelect = document.querySelector("#time-editor-container")) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientHeight) || 0;
2015
2015
  return /*#__PURE__*/React__default['default'].createElement(RowDnd, {
@@ -3220,7 +3220,7 @@ var useRowSelection = function useRowSelection(options) {
3220
3220
  var handleClickOutside = React.useCallback(function (target) {
3221
3221
  if (disabled) return;
3222
3222
  // 如果点击的不是选中的 action 或框选框,清除选择
3223
- if (!target.closest('.timeline-editor-selection-box') && !target.closest('.timeline-editor-action') && !target.closest('[data-draggable="true"]') && !target.closest('.voice-studio-right-config-panel') && !target.closest('.voice-studio-main-content-panel')) {
3223
+ if (!target.closest('.timeline-editor-selection-box') && !target.closest('.timeline-editor-action') && !target.closest('[data-draggable="true"]') && !target.closest('.voice-studio-right-config-panel') && !target.closest('.voice-studio-main-content-panel') && !target.closest('.ant-modal')) {
3224
3224
  clearSelection();
3225
3225
  }
3226
3226
  }, [disabled, clearSelection]);
@@ -3936,9 +3936,13 @@ var EditAreaO = /*#__PURE__*/React__default['default'].forwardRef(function (prop
3936
3936
  // 监听 Ctrl+ 点击事件
3937
3937
  React.useEffect(function () {
3938
3938
  var handleCtrlClickAction = function handleCtrlClickAction(e) {
3939
+ var _editorData$;
3939
3940
  var _e$detail = e.detail,
3940
3941
  actionId = _e$detail.actionId,
3941
3942
  row = _e$detail.row;
3943
+ if (row.type !== ((_editorData$ = editorData[0]) === null || _editorData$ === void 0 ? void 0 : _editorData$.type)) {
3944
+ return;
3945
+ }
3942
3946
  console.log('ctrl-click-action', row, ', editorData = ', editorData);
3943
3947
  setSelectedActionIds(function (ids) {
3944
3948
  var newIds = new Set();
@@ -4247,12 +4251,16 @@ var TimeArea = function TimeArea(_ref) {
4247
4251
  height = _ref3.height;
4248
4252
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(reactVirtualized.Grid, {
4249
4253
  ref: gridRef,
4254
+ containerStyle: {
4255
+ width: timelineWidth + 10,
4256
+ maxWidth: timelineWidth + 10
4257
+ },
4250
4258
  columnCount: showUnit ? scaleCount * scaleSplitCount + 1 : scaleCount,
4251
4259
  columnWidth: getColumnWidth,
4252
4260
  estimatedColumnSize: estColumnWidth,
4253
4261
  rowCount: 1,
4254
4262
  rowHeight: height,
4255
- width: timelineWidth,
4263
+ width: timelineWidth + 10,
4256
4264
  // width={width}
4257
4265
  height: height,
4258
4266
  overscanRowCount: 0,
@@ -4492,7 +4500,7 @@ var Timeline = /*#__PURE__*/React__default['default'].forwardRef(function (props
4492
4500
  if (areaRef.current) {
4493
4501
  var resizeObserver = new ResizeObserver(function () {
4494
4502
  if (!areaRef.current) return;
4495
- setWidth(areaRef.current.getBoundingClientRect().width);
4503
+ setWidth(areaRef.current.getBoundingClientRect().width + 10);
4496
4504
  });
4497
4505
  resizeObserver.observe(areaRef.current);
4498
4506
  return function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sense-react-timeline-editor",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "author": "xzdarcy",
5
5
  "license": "MIT",
6
6
  "keywords": [