Skip to content

Commit

Permalink
Develop (#81)
Browse files Browse the repository at this point in the history
* update: 默认README为英文

* update: 更新README的codesandbox地址

* update: 新增codesandbox地址

* update: 新增宣传图

* fix: 修复移动画布后解除组合导致画布偏移问题

* fix: 解决ts引入的时的类型错误

* update:  更新依赖包文件

* update: 更新版本号

* update: 添加贡献者名单

* update: 发布新版本

* update: 更新版本号

* update: 更新包管理

* update: 删除无用依赖,并更新eslint

* update: 升级版本号

* update: 用workspace代替线上版本号

* update: 更新属性工具属性入参

* update: 更新本地依赖包

* update: 更新setTool方法

* update: 更新tool的config类型

* refactor: diamond -> regularPolygon

* update: setTool可以设置null也可设置相同tool

* update: 同一tool导出内容

* update: 更新版本号

* update: 使用空间别名饮用依赖包

* update: 更新tools的config配置

* update: 工具ImageTool导出ImageConfig

* update: 升级版本到1.0.0

* update: 删除无用的公共依赖

* update: 更新vitest版本号

* update: 增加本地启动逻辑

* fix: 修复文本在编辑态删除

* update: 更新版本号

* update: 更新本地依赖

* update: 更新部分依赖包版本

* update: 更新网址国际化

* refactor: 重构代码结构

* update: 补充history:installed事件的触发

* update: 升级版本号

* update: 更新版本号

* update: 更新版本号1.0.1->1.0.2

* update: 删除无用的事件注册

* update: 更新导入文件后图层顺序问题

* update: 删除插件定义中的 resetLayer

* update: 更新初始化背景图的逻辑

* update: 更新项目版本号

---------

Co-authored-by: Yan Heng <yanheng@siactpower.com>
  • Loading branch information
JessYan0913 and Yan Heng authored Mar 22, 2024
1 parent 45560c9 commit c5eedac
Show file tree
Hide file tree
Showing 10 changed files with 1,509 additions and 1,450 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-template",
"private": true,
"version": "1.0.1",
"version": "1.0.3",
"packageManager": "pnpm@7.13.6",
"scripts": {
"bootstrap": "pnpm i && pnpm build",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pictode/core",
"private": false,
"version": "1.0.2",
"version": "1.0.3",
"main": "dist/pictode-core.umd.js",
"module": "dist/pictode-core.mjs",
"types": "types/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class App extends BaseService<EventArgs> {
this.stage.add(this.backgroundLayer, this.mainLayer, this.optionLayer);

this.background.fillPatternImage(getBackgroundImage(this.config.background));
this.triggerBackground(this.config.background.enabled);

this.tooler = new Tooler(this);
this.mouse = new Mouse(this);
Expand Down Expand Up @@ -141,7 +142,7 @@ export class App extends BaseService<EventArgs> {
return this;
}

public triggerBackgroundVisible(visible?: boolean): this {
public triggerBackground(visible?: boolean): this {
this.background.visible(visible || !this.background.visible());
return this;
}
Expand Down Expand Up @@ -472,6 +473,7 @@ export class App extends BaseService<EventArgs> {
this.mainLayer = layer;
this.stage.add(this.mainLayer);
this.mainLayer.moveToBottom();
this.backgroundLayer.moveToBottom();
this.render();
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-selector/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pictode/plugin-selector",
"private": false,
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/pictode-plugin-selector.umd.js",
"module": "dist/pictode-plugin-selector.mjs",
"types": "types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pictode/utils",
"private": false,
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/pictode-utils.umd.js",
"module": "dist/pictode-utils.mjs",
"types": "types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-aide/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pictode/vue-aide",
"private": false,
"version": "1.0.0",
"version": "1.0.1",
"sideEffects": [
"dist/*",
"src/theme/*"
Expand Down
2 changes: 1 addition & 1 deletion pictode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pictode",
"private": false,
"version": "1.0.2",
"version": "1.0.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion pictode/src/hooks/useContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const useContextMenu = (app: App, selected: Ref<Array<KonvaNode>>) => {
icon: 'lattice-pattern',
label: '背景',
action: () => {
app.triggerBackgroundVisible();
app.triggerBackground();
},
},
]
Expand Down
10 changes: 9 additions & 1 deletion pictode/src/hooks/usePictode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ import { FormConfig, FormValue } from '@/form';
import { getPanelConfigByShape, getPanelConfigByTool } from '@/panels';

export const usePictode = () => {
const app = new App();
const app = new App({
background: {
enabled: false,
shape: 'circle',
color: '#000',
padding: 40,
size: 2,
},
});

const historyPlugin = new HistoryPlugin({
enabled: true,
Expand Down
Loading

0 comments on commit c5eedac

Please sign in to comment.