fix(B07 CAD): 표 놓기 — 보낸 표 선 색 · 굵기 그대로 (41-2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UoSr2sqvYtBf1dtQdus88s
This commit is contained in:
@@ -52,13 +52,18 @@ describe('표 놓기(PLACETABLE)', () => {
|
||||
it('place-table 메시지 = 연결을 단 표를 맡기고 PLACETABLE 을 켬', async () => {
|
||||
const notify = vi.fn();
|
||||
const handled = await handleTableMessage(
|
||||
{ type: AISLO_PLACE_TABLE_MESSAGE, entity: await table().toJson(), link: 'T7' },
|
||||
{
|
||||
type: AISLO_PLACE_TABLE_MESSAGE,
|
||||
entity: { ...(await table().toJson()), lineColor: '#123456' },
|
||||
link: 'T7',
|
||||
},
|
||||
notify
|
||||
);
|
||||
expect(handled).toBe(true);
|
||||
expect(run).toHaveBeenCalledWith('PLACETABLE');
|
||||
expect(getPendingTable()?.getStyle().연결).toBe('T7');
|
||||
expect(getPendingTable()?.getCell(0, 0)?.colSpan).toBe(2);
|
||||
expect(getPendingTable()?.lineColor).toBe('#123456');
|
||||
expect(notify).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
@@ -40,17 +40,17 @@ export function updateLinkedTables(link: string, cells: TableCells): number {
|
||||
/** 표 JSON 을 놓기 도구에 맡기고 도구를 켬 */
|
||||
export async function startPlaceTable(entity: JsonEntity, link: string): Promise<void> {
|
||||
const table = await TableEntity.fromJson(entity as Parameters<typeof TableEntity.fromJson>[0]);
|
||||
const style = table.getStyle();
|
||||
setPendingTable(
|
||||
new TableEntity(
|
||||
table.layerId,
|
||||
table.getOrigin(),
|
||||
table.getColumnWidths(),
|
||||
table.getRowHeights(),
|
||||
table.getCells(),
|
||||
{ ...style, 연결: link }
|
||||
)
|
||||
const linked = new TableEntity(
|
||||
table.layerId,
|
||||
table.getOrigin(),
|
||||
table.getColumnWidths(),
|
||||
table.getRowHeights(),
|
||||
table.getCells(),
|
||||
{ ...table.getStyle(), 연결: link }
|
||||
);
|
||||
linked.lineColor = table.lineColor; // 보낸 선 색 · 굵기 그대로
|
||||
linked.lineWidth = table.lineWidth;
|
||||
setPendingTable(linked);
|
||||
runCommandInput('PLACETABLE');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user