sense-react-timeline-editor 1.1.26 → 1.1.27

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
@@ -2961,7 +2961,6 @@ var css_248z$3 = ".timeline-editor-edit-row {\n background-repeat: no-repeat, r
2961
2961
  styleInject(css_248z$3);
2962
2962
 
2963
2963
  var EditRow = function EditRow(props) {
2964
- var _areaRef$current;
2965
2964
  var rowData = props.rowData,
2966
2965
  _props$style = props.style,
2967
2966
  style = _props$style === void 0 ? {} : _props$style,
@@ -2983,8 +2982,8 @@ var EditRow = function EditRow(props) {
2983
2982
  var classNames = ['edit-row'];
2984
2983
  if (rowData === null || rowData === void 0 ? void 0 : rowData.selected) classNames.push('selected');
2985
2984
  if (rowData === null || rowData === void 0 ? void 0 : rowData.isPreview) classNames.push('preview-row');
2986
- var viewportWidth = ((_areaRef$current = areaRef.current) === null || _areaRef$current === void 0 ? void 0 : _areaRef$current.clientWidth) || window.innerWidth || document.documentElement.clientWidth;
2987
- var overscanPx = Math.max(2000, viewportWidth * 2);
2985
+ var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
2986
+ var overscanPx = Math.max(400, viewportWidth * 0.7);
2988
2987
  var timeStart = parserPixelToTime(scrollLeft - overscanPx, {
2989
2988
  startLeft: startLeft,
2990
2989
  scale: scale,
@@ -4323,7 +4322,7 @@ var TimeArea = function TimeArea(_ref) {
4323
4322
  var gridRef = useRef();
4324
4323
  /** 是否显示细分刻度 */
4325
4324
  var showUnit = scaleSplitCount > 0;
4326
- var visibleWidth = timelineWidth || document.documentElement.clientWidth;
4325
+ var visibleWidth = document.documentElement.clientWidth;
4327
4326
  /** 获取每个 cell 渲染内容 */
4328
4327
  var cellRenderer = function cellRenderer(_ref2) {
4329
4328
  var columnIndex = _ref2.columnIndex,
package/dist/index.js CHANGED
@@ -2971,7 +2971,6 @@ var css_248z$3 = ".timeline-editor-edit-row {\n background-repeat: no-repeat, r
2971
2971
  styleInject(css_248z$3);
2972
2972
 
2973
2973
  var EditRow = function EditRow(props) {
2974
- var _areaRef$current;
2975
2974
  var rowData = props.rowData,
2976
2975
  _props$style = props.style,
2977
2976
  style = _props$style === void 0 ? {} : _props$style,
@@ -2993,8 +2992,8 @@ var EditRow = function EditRow(props) {
2993
2992
  var classNames = ['edit-row'];
2994
2993
  if (rowData === null || rowData === void 0 ? void 0 : rowData.selected) classNames.push('selected');
2995
2994
  if (rowData === null || rowData === void 0 ? void 0 : rowData.isPreview) classNames.push('preview-row');
2996
- var viewportWidth = ((_areaRef$current = areaRef.current) === null || _areaRef$current === void 0 ? void 0 : _areaRef$current.clientWidth) || window.innerWidth || document.documentElement.clientWidth;
2997
- var overscanPx = Math.max(2000, viewportWidth * 2);
2995
+ var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
2996
+ var overscanPx = Math.max(400, viewportWidth * 0.7);
2998
2997
  var timeStart = parserPixelToTime(scrollLeft - overscanPx, {
2999
2998
  startLeft: startLeft,
3000
2999
  scale: scale,
@@ -4333,7 +4332,7 @@ var TimeArea = function TimeArea(_ref) {
4333
4332
  var gridRef = React.useRef();
4334
4333
  /** 是否显示细分刻度 */
4335
4334
  var showUnit = scaleSplitCount > 0;
4336
- var visibleWidth = timelineWidth || document.documentElement.clientWidth;
4335
+ var visibleWidth = document.documentElement.clientWidth;
4337
4336
  /** 获取每个 cell 渲染内容 */
4338
4337
  var cellRenderer = function cellRenderer(_ref2) {
4339
4338
  var columnIndex = _ref2.columnIndex,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sense-react-timeline-editor",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "author": "xzdarcy",
5
5
  "license": "MIT",
6
6
  "keywords": [