@lvce-editor/main-area-worker 8.10.0 → 8.11.0

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.
@@ -3191,8 +3191,8 @@ const parse = sashId => {
3191
3191
  if (!beforeRaw || !afterRaw) {
3192
3192
  return undefined;
3193
3193
  }
3194
- const beforeGroupId = Number.parseInt(beforeRaw, 10);
3195
- const afterGroupId = Number.parseInt(afterRaw, 10);
3194
+ const beforeGroupId = Number.parseFloat(beforeRaw);
3195
+ const afterGroupId = Number.parseFloat(afterRaw);
3196
3196
  if (!Number.isFinite(beforeGroupId) || !Number.isFinite(afterGroupId)) {
3197
3197
  return undefined;
3198
3198
  }
@@ -4371,8 +4371,6 @@ const renderSash = (direction, sashId, style) => {
4371
4371
  className: direction === 'horizontal' ? 'Sash SashVertical' : 'Sash SashHorizontal',
4372
4372
  'data-sashId': sashId,
4373
4373
  onPointerDown: HandleSashPointerDown,
4374
- onPointerMove: HandleSashPointerMove,
4375
- onPointerUp: HandleSashPointerUp,
4376
4374
  style,
4377
4375
  type: Div
4378
4376
  }];
@@ -4387,18 +4385,19 @@ const renderSingleEditorGroup = (layout, splitButtonEnabled, sizeProperty) => {
4387
4385
  };
4388
4386
 
4389
4387
  const getMainAreaVirtualDom = (layout, splitButtonEnabled = false) => {
4390
- const sizeProperty = layout.direction === 'vertical' ? 'height' : 'width';
4391
- if (layout.groups.length === 1) {
4388
+ const {
4389
+ direction,
4390
+ groups
4391
+ } = layout;
4392
+ const sizeProperty = direction === 'vertical' ? 'height' : 'width';
4393
+ if (groups.length === 1) {
4392
4394
  return renderSingleEditorGroup(layout, splitButtonEnabled, sizeProperty);
4393
4395
  }
4394
4396
  const children = [];
4395
- const isSplit = layout.groups.length > 1;
4396
- const directionClassName = isSplit ? layout.direction === 'horizontal' ? EditorGroupsVertical : EditorGroupsHorizontal : '';
4397
+ const isSplit = groups.length > 1;
4398
+ const directionClassName = isSplit ? direction === 'horizontal' ? EditorGroupsVertical : EditorGroupsHorizontal : '';
4397
4399
  const editorGroupsContainerClassName = directionClassName ? `${EDITOR_GROUPS_CONTAINER} ${directionClassName}` : EDITOR_GROUPS_CONTAINER;
4398
4400
  let sashOffset = 0;
4399
- const {
4400
- groups
4401
- } = layout;
4402
4401
  for (let i = 0; i < groups.length; i++) {
4403
4402
  sashOffset += groups[i].size;
4404
4403
  if (i > 0) {
@@ -4406,8 +4405,8 @@ const getMainAreaVirtualDom = (layout, splitButtonEnabled = false) => {
4406
4405
  const beforeGroupId = groups[i - 1].id;
4407
4406
  const afterGroupId = groups[i].id;
4408
4407
  const sashId = create(beforeGroupId, afterGroupId);
4409
- const style = layout.direction === 'horizontal' ? `left:${sashOffset - groups[i].size}%;` : `top:${sashOffset - layout.groups[i].size}%;`;
4410
- children.push(...renderSash(layout.direction, sashId, style));
4408
+ const style = direction === 'horizontal' ? `left:${sashOffset - groups[i].size}%;` : `top:${sashOffset - groups[i].size}%;`;
4409
+ children.push(...renderSash(direction, sashId, style));
4411
4410
  }
4412
4411
  children.push(...renderEditorGroup(groups[i], i, splitButtonEnabled, sizeProperty));
4413
4412
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/main-area-worker",
3
- "version": "8.10.0",
3
+ "version": "8.11.0",
4
4
  "description": "Main Area Worker",
5
5
  "repository": {
6
6
  "type": "git",