Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #38

Merged
merged 38 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
226862d
update: 默认README为英文
JessYan0913 Oct 9, 2023
daba543
update: 更新README的codesandbox地址
JessYan0913 Oct 12, 2023
75d66a7
update: 新增codesandbox地址
JessYan0913 Oct 12, 2023
e5b9a2c
Merge branch 'main' into develop
JessYan0913 Oct 12, 2023
f354da6
update: 新增宣传图
JessYan0913 Oct 18, 2023
0a4fbc2
fix: 修复移动画布后解除组合导致画布偏移问题
Oct 21, 2023
99772ba
fix: 解决ts引入的时的类型错误
JessYan0913 Oct 22, 2023
f77ee10
Merge branch 'develop' of https://github.com/JessYan0913/pictode into…
JessYan0913 Oct 22, 2023
6a6c5d5
update: 更新依赖包文件
JessYan0913 Oct 23, 2023
6214d46
update: 更新版本号
JessYan0913 Oct 23, 2023
5fdfde2
Merge branch 'main' into develop
JessYan0913 Oct 23, 2023
e156af7
update: 添加贡献者名单
Oct 24, 2023
1014ad0
Merge remote-tracking branch 'origin' into develop
Oct 24, 2023
54b1901
Merge remote-tracking branch 'origin/main' into develop
JessYan0913 Oct 24, 2023
2a76523
update: 发布新版本
JessYan0913 Oct 24, 2023
a3fba2e
update: 更新版本号
Oct 26, 2023
6b59ef5
Merge remote-tracking branch 'origin/main' into develop
Oct 26, 2023
b763a0d
update: 更新包管理
Oct 26, 2023
49cfa46
update: 删除无用依赖,并更新eslint
Oct 26, 2023
340d11b
update: 升级版本号
Oct 26, 2023
f164e9d
Merge remote-tracking branch 'origin/main' into develop
Oct 26, 2023
51d9a81
update: 用workspace代替线上版本号
JessYan0913 Oct 26, 2023
b643fa4
update: 更新属性工具属性入参
JessYan0913 Oct 26, 2023
bb233b6
update: 更新本地依赖包
JessYan0913 Oct 26, 2023
12a150d
update: 更新setTool方法
JessYan0913 Oct 26, 2023
139db95
update: 更新tool的config类型
JessYan0913 Oct 28, 2023
8eff6d7
refactor: diamond -> regularPolygon
JessYan0913 Oct 28, 2023
f594b6a
update: setTool可以设置null也可设置相同tool
JessYan0913 Oct 30, 2023
0a544dd
update: 同一tool导出内容
JessYan0913 Oct 30, 2023
5bfc67d
update: 更新版本号
JessYan0913 Oct 30, 2023
321d96e
Merge remote-tracking branch 'origin/main' into develop
JessYan0913 Oct 30, 2023
a6340cc
update: 使用空间别名饮用依赖包
JessYan0913 Oct 30, 2023
d5afbf0
update: 更新tools的config配置
JessYan0913 Oct 30, 2023
f652ddf
update: 工具ImageTool导出ImageConfig
JessYan0913 Oct 30, 2023
ba4ffdf
update: 升级版本到1.0.0
JessYan0913 Oct 30, 2023
4800779
Merge remote-tracking branch 'origin/main' into develop
JessYan0913 Oct 30, 2023
6e4bf9e
update: 删除无用的公共依赖
JessYan0913 Nov 8, 2023
10c45c1
update: 更新vitest版本号
JessYan0913 Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update: 更新属性工具属性入参
  • Loading branch information
JessYan0913 committed Oct 26, 2023
commit b643fa413eb95521da2617e0cd9c12ad2a2f41b8
8 changes: 3 additions & 5 deletions packages/tools/src/diamond/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type DiamondToolConfig = Pick<Konva.RegularPolygonConfig, 'stroke' | 'fill' | 'strokeWidth' | 'opacity'>;

interface DiamondToolOptions {
config?: DiamondToolConfig;
config?: Konva.RegularPolygonConfig;
hooks?: ToolHooks;
}

export class DiamondTool implements Tool<DiamondToolConfig> {
export class DiamondTool implements Tool<Konva.RegularPolygonConfig> {
public name = 'diamondTool';
public hooks?: ToolHooks;
public config?: DiamondToolConfig;
public config?: Konva.RegularPolygonConfig;
private diamond: Konva.RegularPolygon | null = null;
private startPointer: util.Point = new util.Point(0, 0);

Expand Down
6 changes: 2 additions & 4 deletions packages/tools/src/drawing/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type DrawingToolConfig = Pick<Konva.LineConfig, 'stroke' | 'strokeWidth' | 'opacity'>;

interface DrawingToolOptions {
config?: Konva.LineConfig;
hooks?: ToolHooks;
}

export class DrawingTool implements Tool<DrawingToolConfig> {
export class DrawingTool implements Tool<Konva.LineConfig> {
public name = 'drawingTool';
public config?: DrawingToolConfig;
public config?: Konva.LineConfig;
public hooks?: ToolHooks;
private line: Konva.Line | null = null;
private points: util.Point[] = [];
Expand Down
8 changes: 3 additions & 5 deletions packages/tools/src/ellipse/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type EllipseToolConfig = Pick<Konva.EllipseConfig, 'stroke' | 'fill' | 'strokeWidth' | 'opacity'>;

interface EllipseToolOptions {
config?: EllipseToolConfig;
config?: Konva.EllipseConfig;
hooks?: ToolHooks;
}

export class EllipseTool implements Tool<EllipseToolConfig> {
export class EllipseTool implements Tool<Konva.EllipseConfig> {
public name = 'ellipseTool';
public config?: EllipseToolConfig;
public config?: Konva.EllipseConfig;
public hooks?: ToolHooks;
private ellipse: Konva.Ellipse | null = null;
private startPointer: util.Point = new util.Point(0, 0);
Expand Down
8 changes: 3 additions & 5 deletions packages/tools/src/image/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type ImageToolConfig = Pick<Konva.ImageConfig, 'stroke' | 'strokeWidth' | 'opacity'>;

interface ImageToolOptions {
config?: ImageToolConfig;
config?: Konva.ImageConfig;
hooks?: ToolHooks;
}

export class ImageTool implements Tool<ImageToolConfig> {
export class ImageTool implements Tool<Konva.ImageConfig> {
public name = 'imageTool';
public config?: ImageToolConfig;
public config?: Konva.ImageConfig;
public hooks?: ToolHooks;
private image: Konva.Image | null = null;
private isAdded: boolean = false;
Expand Down
8 changes: 3 additions & 5 deletions packages/tools/src/line/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type LineToolConfig = Pick<Konva.LineConfig, 'stroke' | 'strokeWidth' | 'opacity'>;

interface LineToolOptions {
config?: LineToolConfig;
config?: Konva.LineConfig;
hooks?: ToolHooks;
}

export class LineTool implements Tool<LineToolConfig> {
export class LineTool implements Tool<Konva.LineConfig> {
public name = 'lineTool';
public config?: LineToolConfig;
public config?: Konva.LineConfig;
public hooks?: ToolHooks;
private points: util.Point[] = [];
private line: Konva.Line | null = null;
Expand Down
8 changes: 3 additions & 5 deletions packages/tools/src/rect/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Konva, Tool, ToolEvent, ToolHooks, util } from '@pictode/core';

type RectToolConfig = Pick<Konva.RectConfig, 'stroke' | 'strokeWidth' | 'fill' | 'cornerRadius' | 'opacity'>;

interface RectToolOptions {
config?: RectToolConfig;
config?: Konva.RectConfig;
hooks?: ToolHooks;
}

export class RectTool implements Tool<RectToolConfig> {
export class RectTool implements Tool<Konva.RectConfig> {
public name = 'rectTool';
public config?: RectToolConfig;
public config?: Konva.RectConfig;
public hooks?: ToolHooks;
private startPointer: util.Point = new util.Point(0, 0);
private rectangle: Konva.Rect | null = null;
Expand Down
8 changes: 3 additions & 5 deletions packages/tools/src/text/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ const handleTextDoubleClick = (app: App, textNode: Konva.Text, onUpdated: () =>
});
};

type TextToolConfig = Pick<Konva.TextConfig, 'stroke' | 'strokeWidth' | 'fill' | 'fontSize' | 'opacity'>;

interface TextToolOptions {
config?: TextToolConfig;
config?: Konva.TextConfig;
hooks?: ToolHooks;
}

export class TextTool implements Tool<TextToolConfig> {
export class TextTool implements Tool<Konva.TextConfig> {
public name: string = 'textTool';
public config?: TextToolConfig;
public config?: Konva.TextConfig;
public hooks?: ToolHooks;
private textNode: Konva.Text | null = null;

Expand Down