parisma
|
39468f3b95
|
feat(editor,form,core,schema): 事件支持触发代码块
|
2023-03-29 07:13:57 +00:00 |
|
roymondchen
|
35f9a59f44
|
feat(editor): 新增依赖收集器
|
2023-03-27 19:07:56 +08:00 |
|
roymondchen
|
c9bacb96cd
|
feat(stage,editor): 增肌删除快捷按钮
|
2023-03-02 16:47:20 +08:00 |
|
roymondchen
|
0491487385
|
feat(editor): 修改service get set 方法的ts定义,不再需要传入泛型参数
|
2023-02-06 19:25:37 +08:00 |
|
oceanzhu
|
23708e4644
|
chore: 更新版权年份
|
2023-01-04 16:11:51 +08:00 |
|
roymondchen
|
3b30d89956
|
fix(editor): 新增的组件如果没有初始化left值,会导致无法通过键盘方向键左右移动
fix #468
|
2022-12-30 16:33:38 +08:00 |
|
roymondchen
|
dd8ac99d5d
|
feat(stage,editor): 添加disabledDragStart配置,用于关闭按下鼠标并拖动功能
|
2022-12-12 16:56:08 +08:00 |
|
roymondchen
|
45eaea6f68
|
fix(editor): 编辑器初始化默认选择节点
|
2022-12-05 20:05:23 +08:00 |
|
oceanzhu
|
3fb880d09b
|
refactor(stage):重构魔方编辑器stage代码
Squash merge branch 'feature/oc_actionbox_879360293' into 'master'
对魔方编辑器核心代码stage进行重构,这部分代码主要是负责编辑器中间画布区域的处理,包括渲染一个所见即所得的画布,支持组件的增删改查和拖拽、高亮操作。
旧代码存在的问题以及解决方案:
1、过多暴露属性和循环引用,导致stageCore、stageDragResize、StageMultiDragResize、StageRender、StageMask、StageHighlight之间形成复杂的网状依赖,非常不可控。StageCore负责创建后面5个类的实例,并把这些实例作为自己的公共属性,同时core把自己的this传给这些实例,这些实例就会通过core传进来的this,通过core间接的访问其它实例的方法和属性,比如在stageDragResize中可能存在这样的一个访问:this.core.stageRender.contentWindow.document
解决方案:
1)、属性尽量设置为私有,对外暴露方法,不暴露属性;
2)、core避免向其它类传递this,改为传递接口,需要什么就传什么
2、事件传递较多,跳来跳去,定位问题较为困难
解决方案:
重新梳理各个类的职责,尽量在类中闭环,减少事件传递。
新增了actionManager类,core负责管理render、mask、actionManager三个类;
actionManager负责管理单选、多选、高亮三个类,同时将mask中的事件监听,转移到actionManager监听,actionManager形成单选、多选、高亮行为后,直接调动单选、多选、高亮完成功能。
3、存在一些重复代码
主要是拖拽框的代码在单选、多选、高亮中各自维护,改为统一维护
4、多选不支持辅助线对齐
将单选中的moveableOption管理逻辑抽取出来成为单选和多选的父类,使多选支持辅助线对齐
本次改动取消了一些对外暴露的属性,moveableOption回调函数签名也有变化,详细情况如下:
删除stageCore公共属性:
public selectedDom: HTMLElement | undefined;
public selectedDomList: HTMLElement[] = [];
public highlightedDom: Element | undefined;
public dr: StageDragResize;
public multiDr: StageMultiDragResize;
public highlightLayer: StageHighlight;
public config: StageCoreConfig;
public zoom = DEFAULT_ZOOM;
public containerHighlightClassName: string;
public containerHighlightDuration: number;
public containerHighlightType?: ContainerHighlightType;
public isContainer: IsContainer;
stageCore入参改动:
这两个参数原本定义:
moveableOptions?: ((core?: StageCore) => MoveableOptions) | MoveableOptions;
multiMoveableOptions?: ((core?: StageCore) => MoveableOptions) | MoveableOptions;
修改后定义:
moveableOptions?: CustomizeMoveableOptions;
multiMoveableOptions?: CustomizeMoveableOptions;
CustomizeMoveableOptions =
| ((config?: CustomizeMoveableOptionsCallbackConfig) => MoveableOptions)
| MoveableOptions
| undefined;
export interface CustomizeMoveableOptionsCallbackConfig {
targetElId?: string;
}
|
2022-11-24 21:19:56 +08:00 |
|
parisma
|
c7a8552d9b
|
fix: 代码块结构改造完成
|
2022-11-10 19:53:35 +08:00 |
|
parisma
|
3673d6016d
|
feat(editor): 代码编辑新增草稿功能
#440
|
2022-11-10 19:53:35 +08:00 |
|
roymondchen
|
66e727838b
|
fix(editor): 多选后,再单选多选中的第一个元素,多选状态没有清除
|
2022-11-04 19:46:54 +08:00 |
|
roymondchen
|
8d8ef55b81
|
fix(editor): 画布滚动条出现的不准确
|
2022-11-04 19:39:47 +08:00 |
|
roymondchen
|
11e0e04cbd
|
feat(editor,stage): 在画布中支持选择父组件
close #403
|
2022-10-20 19:52:53 +08:00 |
|
roymondchen
|
40410292d7
|
fix(editor): 多选后拖动,组件树会收缩
|
2022-10-14 15:56:33 +08:00 |
|
parisma
|
bfaa8317e3
|
feat(editor): 支持代码块维度查看与组件的绑定关系,并支持从代码块列表解除绑定
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
ddd22ff486
|
fix(editor): 绑定关系组件增加option来源的默认逻辑
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
5b220a0e06
|
feat(editor): codeBlockService暴露一些方法支持hook,默认设置代码块到dsl的method字段
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
0c25cf795f
|
feat(editor): 代码块绑定功能完成
|
2022-09-22 16:46:11 +08:00 |
|
parisma
|
7020ab4a1f
|
feat(editor)): 组件绑定代码块form表单配置
|
2022-09-22 16:46:11 +08:00 |
|
roymondchen
|
bee9f92abb
|
fix(editor): 画布大小变化,滚动条重置
|
2022-09-15 14:18:27 +08:00 |
|
roymondchen
|
458f493150
|
build: 使用esbuildOptions定义global
|
2022-09-06 15:38:16 +08:00 |
|
roymondchen
|
de8ef8dc58
|
feat(editor): 画布添加滚动条
fix #262
|
2022-08-26 22:00:16 +08:00 |
|
roymondchen
|
31029bc8f1
|
feat(editor): propsService添加fillConfig方法,支持扩展
|
2022-08-23 20:35:34 +08:00 |
|
roymondchen
|
3cdcca3b0b
|
chore(editor): 删除无用代码
|
2022-08-23 20:35:34 +08:00 |
|
roymondchen
|
5f0e421550
|
fix(editor): 复制页面错误
|
2022-08-17 15:27:10 +08:00 |
|
roymondchen
|
0e82f652a9
|
fix(editor): 删除节点后,标记父节点为修改状态
|
2022-08-11 17:25:54 +08:00 |
|
roymondchen
|
b6fa064b0b
|
feat(editor): editorService.add支持添加多个组件
|
2022-08-11 14:26:03 +08:00 |
|
roymondchen
|
08dae20aa0
|
build(editor): 由于生成.d文件无法将别名转化成真实路径,暂时将@editor改回相对路径
|
2022-08-05 20:12:35 +08:00 |
|
wangminghua
|
9ffecf62f7
|
fix(editor): 添加组件粘贴操作支持偏移量
|
2022-08-05 20:10:32 +08:00 |
|
parisma
|
8c64ea798a
|
feat(editor): 多选粘贴后同步选中粘贴的多个元素,并支持拖拽,粘贴删除支持多个元素同时撤销到上一步
|
2022-08-04 12:38:36 +08:00 |
|
khuntoriia
|
b702857aad
|
feat(editor): 多选菜单支持复制粘贴删除 (#217)
* feat(editor): 多选菜单支持复制粘贴删除
* fix(editor): 编辑器选中节点统一为nodes数组,保留原node对象为nodes数组的第一个元素,将复制粘贴删除行为封装到editorservice中,支持键盘快捷键
* test(editor): 修改editor相关测试用例
* fix(editor): cr问题修改
* feat(editor): 将复制粘贴操作进行拆分封装
* fix(editor): cr修改
Co-authored-by: parisma <parisma@tencent.com>
|
2022-08-03 14:03:36 +08:00 |
|
roymondchen
|
fff587d9eb
|
fix(editor): 新增组件id不对
|
2022-07-27 16:47:12 +08:00 |
|
roymondchen
|
d334b697ae
|
fix(editor): 指定父节点添加组件
|
2022-07-25 22:02:17 +08:00 |
|
roymondchen
|
de0c6952c7
|
feat: 支持将组件拖动到指定容器
|
2022-07-14 19:02:29 +08:00 |
|
roymondchen
|
fb612eaddc
|
feat(editor): 参考线缓存与页面绑定
|
2022-06-22 16:51:28 +08:00 |
|
jia000
|
0fe6e0ed75
|
release v1.0.0-rc.11 (#138)
* fix(editor): 页面标题不要换行
* docs: 教程与stageCore
* fix(editor): runtime.updateRootConfig可以为空
* fix(editor): 编辑组件是获取parent需要获取到Proxy
* fix(editor): 默认page属性值加上layout
* fix(stage): magic注入时机应当在iframe onload之后
* chore: release v1.0.0-rc.11
* chore: 更新changlog
Co-authored-by: roymondchen <roymondchen@tencent.com>
|
2022-06-17 17:13:22 +08:00 |
|
roymondchen
|
10577aea68
|
fix(editor): page和container默认value加上items
|
2022-06-15 12:49:43 +08:00 |
|
roymondchen
|
5e3125706c
|
feat: 添加组件支持添加组合
|
2022-06-13 16:52:14 +08:00 |
|
roymondchen
|
a9936b5276
|
feat(stage): 支持rotate scale fix #92
|
2022-06-09 19:22:05 +08:00 |
|
roymondchen
|
663d7cee9f
|
fix(editor): 添加组件默认添加到视窗中间,如果组件初始化height不是数值,则当0处理
|
2022-05-31 21:47:54 +08:00 |
|
roymondchen
|
cf5e775b84
|
feat(editor): 添加globalThis兼容
|
2022-05-24 20:49:58 +08:00 |
|
roymondchen
|
5da8601f36
|
feat(editor): 支持拖拽添加组件
|
2022-05-07 15:18:29 +08:00 |
|
roymondchen
|
f7bca02844
|
feat(playground): 增加字体样式配置
|
2022-05-05 20:33:10 +08:00 |
|
marchyang
|
582962f6df
|
fix: 修复单独使用@tmagic/editor,报错无法运行的问题
|
2022-04-28 16:55:10 +08:00 |
|
roymondchen
|
51031fe8ab
|
feat(editor): 添加常用快捷键
|
2022-04-22 12:16:39 +08:00 |
|
roymondchen
|
8e004f9766
|
fix(editor): getLayout增加判断fixed
|
2022-04-22 12:16:39 +08:00 |
|
roymondchen
|
9ae93fc9f2
|
test: 修改测试用例
|
2022-04-13 17:17:14 +08:00 |
|
roymondchen
|
0e74970bfe
|
feat(editor): 新增组件自动设置到视窗中间
|
2022-04-13 17:17:14 +08:00 |
|
roymondchen
|
6dbda7b565
|
style(editor): 将节点类型改成枚举
|
2022-03-31 19:46:12 +08:00 |
|