Skip to content

Commit

Permalink
fix: json imports
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 committed Dec 14, 2023
1 parent 6adae94 commit c0a6546
Show file tree
Hide file tree
Showing 12 changed files with 5,439 additions and 5,417 deletions.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { TemplateCategory } from './builtin-templates.js';
import flowchart from './json/flow-chart.json';
import ganttchart from './json/gantt-chart.json';
import kanban from './json/kanban.json';
import monthlycalendar from './json/monthly-calendar.json';
import storyboard from './json/storyboard.json';
import { flowChart } from './json/flow-chart.js';
import { ganttChart } from './json/gantt-chart.js';
import { kanban } from './json/kanban.js';
import { monthlyCalendar } from './json/monthly-calendar.js';
import { storyboard } from './json/storyboard.js';

export const templates: TemplateCategory[] = [
{
name: 'Project managerment',
templates: [kanban, storyboard, monthlycalendar, ganttchart, flowchart],
templates: [kanban, storyboard, monthlyCalendar, ganttChart, flowChart],
},
];
12 changes: 6 additions & 6 deletions packages/blocks/src/page-block/widgets/drag-handle/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
getClosestBlockElementByElement,
getClosestBlockElementByPoint,
getDropRectByPoint,
getEdgelessPage,
getHoveringNote,
getRectByBlockElement,
isPageMode,
Expand All @@ -24,6 +23,7 @@ import {
import type { ParagraphBlockModel } from '../../../paragraph-block/index.js';
import type { EdgelessBlockType } from '../../../surface-block/index.js';
import { Bound } from '../../../surface-block/index.js';
import type { EdgelessPageBlockComponent } from '../../edgeless/edgeless-page-block.js';
import {
BLOCK_CHILDREN_CONTAINER_PADDING_LEFT,
DRAG_HANDLE_CONTAINER_HEIGHT,
Expand Down Expand Up @@ -364,10 +364,10 @@ export function convertDragPreviewDocToEdgeless({
width?: number;
height?: number;
}): boolean {
const page = blockComponent.page;
if (isPageMode(page)) return false;
const edgelessPage = getEdgelessPage(page);
assertExists(edgelessPage);
const edgelessPage = blockComponent.closest(
'affine-edgeless-page'
) as EdgelessPageBlockComponent;
if (!edgelessPage) return false;

const previewEl = dragPreview.querySelector(cssSelector);
assertExists(previewEl);
Expand All @@ -391,7 +391,7 @@ export function convertDragPreviewDocToEdgeless({
},
edgelessPage.surface.model
);
page.deleteBlock(blockModel);
blockComponent.page.deleteBlock(blockModel);
return true;
}

Expand Down

0 comments on commit c0a6546

Please sign in to comment.