Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into 1420-bug-pivotchar…
Browse files Browse the repository at this point in the history
…t-markline-autorange
  • Loading branch information
fangsmile committed Apr 8, 2024
2 parents ec910fd + c939763 commit f3b84e2
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "feat: scrollbar visible focus #1360\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "refactor: supplement event type for react table #1434\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: borderlinedash effect error handle with lineCap #1436\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
29 changes: 29 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# v0.23.1

2024-04-07


**🆕 New feature**

- **@visactor/vtable**: select range can extends during scroll [#1400](https://github.com/VisActor/VTable/issues/1400)

**🐛 Bug fix**

- **@visactor/vtable**: maxLineWidth value should consider hierarchyOffset [#1224](https://github.com/VisActor/VTable/issues/1224)
- **@visactor/vtable**: tree leaf node textAlign right render error [#1393](https://github.com/VisActor/VTable/issues/1393)
- **@visactor/vtable**: when copy or paste navigator.clipboard?.write occor undefined error in not https [#1421](https://github.com/VisActor/VTable/issues/1421)
- **@visactor/vtable**: fix header cell imageAutoSizing [#1339](https://github.com/VisActor/VTable/issues/1339)
- **@visactor/vtable**: hide icon background when hide icon
- **@visactor/vtable**: fix nan verticalBarPos [#1232](https://github.com/VisActor/VTable/issues/1232)
- **@visactor/vtable**: fix progressbar cover cell border [#1425](https://github.com/VisActor/VTable/issues/1425)
- **@visactor/vtable**: remove container in table option
- **@visactor/vtable**: add sync render in exportCellImg [#1398](https://github.com/VisActor/VTable/issues/1398)

**🔨 Refactor**

- **@visactor/vtable**: optimize performance when change tree hierarchy state [#1406](https://github.com/VisActor/VTable/issues/1406)



[more detail about v0.23.1](https://github.com/VisActor/VTable/releases/tag/v0.23.1)

# v0.23.0

2024-03-29
Expand Down
29 changes: 29 additions & 0 deletions docs/assets/changelog/zh/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# v0.23.1

2024-04-07


**🆕 新增功能**

- **@visactor/vtable**: select range can extends during scroll [#1400](https://github.com/VisActor/VTable/issues/1400)

**🐛 功能修复**

- **@visactor/vtable**: maxLineWidth value should consider hierarchyOffset [#1224](https://github.com/VisActor/VTable/issues/1224)
- **@visactor/vtable**: tree leaf node textAlign right render error [#1393](https://github.com/VisActor/VTable/issues/1393)
- **@visactor/vtable**: when copy or paste navigator.clipboard?.write occor undefined error in not https [#1421](https://github.com/VisActor/VTable/issues/1421)
- **@visactor/vtable**: fix header cell imageAutoSizing [#1339](https://github.com/VisActor/VTable/issues/1339)
- **@visactor/vtable**: hide icon background when hide icon
- **@visactor/vtable**: fix nan verticalBarPos [#1232](https://github.com/VisActor/VTable/issues/1232)
- **@visactor/vtable**: fix progressbar cover cell border [#1425](https://github.com/VisActor/VTable/issues/1425)
- **@visactor/vtable**: remove container in table option
- **@visactor/vtable**: add sync render in exportCellImg [#1398](https://github.com/VisActor/VTable/issues/1398)

**🔨 功能重构**

- **@visactor/vtable**: optimize performance when change tree hierarchy state [#1406](https://github.com/VisActor/VTable/issues/1406)



[更多详情请查看 v0.23.1](https://github.com/VisActor/VTable/releases/tag/v0.23.1)

# v0.23.0

2024-03-29
Expand Down
18 changes: 17 additions & 1 deletion packages/react-vtable/src/eventsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ export interface EventsProps {

// pivot chart only
onVChartEventType?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['vchart_event_type']>;

onChangCellValue?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['change_cell_value']>;

onMousedownFillHandle?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['mousedown_fill_handle']>;
onDragFillHandleEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['drag_fill_handle_end']>;
onDblclickFillHandle?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['dblclick_fill_handle']>;

onScrollVerticalEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll_vertical_end']>;
onScrollHorizontalEnd?: EventCallback<TYPES.TableEventHandlersEventArgumentMap['scroll_horizontal_end']>;
}

export const TABLE_EVENTS = {
Expand Down Expand Up @@ -113,7 +122,14 @@ export const TABLE_EVENTS = {
onDrillMenuClick: EVENT_TYPE.DRILLMENU_CLICK,

// pivot chart only
onVChartEventType: EVENT_TYPE.VCHART_EVENT_TYPE
onVChartEventType: EVENT_TYPE.VCHART_EVENT_TYPE,

onChangCellValue: EVENT_TYPE.CHANGE_CELL_VALUE,
onMousedownFillHandle: EVENT_TYPE.MOUSEDOWN_FILL_HANDLE,
onDragFillHandleEnd: EVENT_TYPE.DRAG_FILL_HANDLE_END,
onDblclickFillHandle: EVENT_TYPE.DBLCLICK_FILL_HANDLE,
onScrollVerticalEnd: EVENT_TYPE.SCROLL_VERTICAL_END,
onScrollHorizontalEnd: EVENT_TYPE.SCROLL_HORIZONTAL_END
};

export const TABLE_EVENTS_KEYS = Object.keys(TABLE_EVENTS);
Expand Down
10 changes: 10 additions & 0 deletions packages/vtable/src/event/listener/table-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,22 @@ export function bindTableGroupListener(eventManager: EventManager) {
// });
// }
// });
table.scenegraph.tableGroup.addEventListener('pointerenter', (e: FederatedPointerEvent) => {
if (table.theme.scrollStyle.visible === 'focus') {
stateManager.showHorizontalScrollBar();
stateManager.showVerticalScrollBar();
}
});
table.scenegraph.tableGroup.addEventListener('pointerleave', (e: FederatedPointerEvent) => {
//resize 列宽 当鼠标离开table也需要继续响应
if (!stateManager.isResizeCol() && !stateManager.isMoveCol() && !stateManager.isSelecting()) {
stateManager.updateInteractionState(InteractionState.default);
stateManager.updateCursor();
}
if (table.theme.scrollStyle.visible === 'focus') {
stateManager.hideHorizontalScrollBar();
stateManager.hideVerticalScrollBar();
}
// 移动到table外部 如移动到表格空白区域 移动到表格浏览器外部
if ((table as any).hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL)) {
if (table.stateManager.hover.cellPos.col !== -1 && table.stateManager.hover.cellPos.row !== -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export function renderStroke(
context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);
// if (isHighlight) {
// context.setLineDash(highlightDash);
// context.lineCap = 'square';
// context.lineCap = 'butt';
// }
const lineDash = context.getLineDash();
let isDash = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function createChartCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function createCheckboxCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function createImageCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function createSparkLineCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function createCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function createVideoCellGroup(
cursor: (cellTheme?.group as any)?.cursor ?? undefined,
lineDash: cellTheme?.group?.lineDash ?? undefined,

lineCap: 'square',
lineCap: 'butt',

clip: true,

Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/scenegraph/style/corner-cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function createCornerCell(cellGroup: Group, frameTheme: ThemeStyle) {
rectAttributes.stroke = getStroke(borderColor as string, undefined);
rectAttributes.lineWidth = borderLineWidth as number;
borderLineDash && (rectAttributes.lineDash = borderLineDash as number[]);
rectAttributes.lineCap = 'square';
rectAttributes.lineCap = 'butt';
if (Array.isArray(borderColor)) {
(rectAttributes as any).strokeArrayColor = getQuadProps(borderColor as any);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/scenegraph/style/frame-border.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function createFrameBorder(
rectAttributes.stroke = getStroke(borderColor, strokeArray);
rectAttributes.lineWidth = borderLineWidth as number;
borderLineDash && (rectAttributes.lineDash = borderLineDash as number[]);
rectAttributes.lineCap = 'square';
rectAttributes.lineCap = 'butt';
}

if (Array.isArray(borderColor)) {
Expand Down

0 comments on commit f3b84e2

Please sign in to comment.