Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
dadb1f4f
提交
dadb1f4f
authored
10月 12, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 视图默认样式优先级设置为'视图',画布优化等
上级
26463756
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
16 行增加
和
29 行删除
+16
-29
shadow.vue
frontend/src/components/DeDrag/shadow.vue
+0
-8
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+1
-1
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+3
-15
chart.js
frontend/src/views/chart/chart/chart.js
+1
-1
Group.vue
frontend/src/views/chart/group/Group.vue
+1
-0
index.vue
frontend/src/views/panel/ViewSelect/index.vue
+1
-1
index.vue
frontend/src/views/panel/edit/index.vue
+9
-3
没有找到文件。
frontend/src/components/DeDrag/shadow.vue
浏览文件 @
dadb1f4f
...
...
@@ -47,13 +47,6 @@ export default {
height
=
this
.
curComponent
.
style
.
height
*
this
.
curCanvasScale
.
scalePointHeight
// console.log('curComponent left:' + left + 'top:' + top + 'width:' + width + 'height:' + height)
}
// 当前默认为自适应
// if (this.canvasStyleData.auxiliaryMatrix) {
// left = Math.round(left / this.curCanvasScale.matrixStyleWidth) * this.curCanvasScale.matrixStyleWidth
// width = Math.round(width / this.curCanvasScale.matrixStyleWidth) * this.curCanvasScale.matrixStyleWidth
// top = Math.round(top / this.curCanvasScale.matrixStyleHeight) * this.curCanvasScale.matrixStyleHeight
// height = Math.round(height / this.curCanvasScale.matrixStyleHeight) * this.curCanvasScale.matrixStyleHeight
// }
// 防止阴影区超出边界
const
xGap
=
left
+
width
-
this
.
canvasWidth
...
...
@@ -107,7 +100,6 @@ export default {
</
script
>
<
style
scoped
>
.main-shadow
{
transition
:
0.2s
;
opacity
:
0.4
;
background
:
#409eff
;
position
:
absolute
;
...
...
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
dadb1f4f
...
...
@@ -189,7 +189,7 @@ export default {
this
.
scaleWidth
=
canvasWidth
*
100
/
parseInt
(
this
.
canvasStyleData
.
width
)
// 获取宽度比
this
.
scaleHeight
=
canvasHeight
*
100
/
parseInt
(
this
.
canvasStyleData
.
height
)
// 获取高度比
console
.
log
(
'scaleHeight:'
+
this
.
scaleHeight
+
';ch:'
+
this
.
canvasStyleData
.
height
)
//
console.log('scaleHeight:' + this.scaleHeight + ';ch:' + this.canvasStyleData.height)
// this.scaleHeight = this.scaleWidth
// this.mainHeight = this.canvasStyleData.height * this.scaleHeight / 100 + 'px'
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
dadb1f4f
...
...
@@ -8,7 +8,6 @@
['parent_transform']:!chartDetailsVisible
}
]"
@dragover="handleDragOver"
@mousedown="handleMouseDown"
@scroll="canvasScroll"
>
...
...
@@ -1348,22 +1347,11 @@ export default {
}
},
handleDragOver
(
e
)
{
// console.log('handleDragOver-Editor')
this
.
dragComponentInfo
.
shadowStyle
.
x
=
e
.
pageX
-
220
this
.
dragComponentInfo
.
shadowStyle
.
y
=
e
.
pageY
-
90
this
.
dragComponentInfo
.
style
.
left
=
this
.
dragComponentInfo
.
shadowStyle
.
x
/
this
.
scalePointWidth
this
.
dragComponentInfo
.
style
.
top
=
this
.
dragComponentInfo
.
shadowStyle
.
y
/
this
.
scalePointHeight
// console.log('handleDragOver=>layer:' + e.layerX + ':' + e.layerY + ';offSet=>' + e.offsetX + ':' + e.offsetY + ';page=' + e.pageX + ':' + e.pageY)
// console.log('e=>x=>' + JSON.stringify(e))
// 使用e.pageX 避免抖动的情况
// this.dragComponentInfo.x = this.dragComponentInfo.shadowStyle.x
// this.dragComponentInfo.y = this.dragComponentInfo.shadowStyle.y
// this.dragComponentInfo.x = Math.round(this.dragComponentInfo.shadowStyle.x / this.matrixStyle.width)
// this.dragComponentInfo.y = Math.round(this.dragComponentInfo.shadowStyle.y / this.matrixStyle.height)
// console.log('dragComponentInfo=>' + JSON.stringify(this.dragComponentInfo))
e
.
preventDefault
()
e
.
dataTransfer
.
dropEffect
=
'copy'
if
(
this
.
canvasStyleData
.
auxiliaryMatrix
)
{
this
.
onDragging
(
e
,
this
.
dragComponentInfo
)
}
...
...
@@ -1679,14 +1667,14 @@ export default {
})
},
removeLastItem
()
{
console
.
log
(
'rlI:'
+
JSON
.
stringify
(
this
.
yourList
))
//
console.log('rlI:' + JSON.stringify(this.yourList))
this
.
removeItem
(
this
.
yourList
.
length
-
1
)
},
startMoveIn
()
{
if
(
this
.
canvasStyleData
.
auxiliaryMatrix
)
{
const
moveInItemInfo
=
this
.
$store
.
state
.
dragComponentInfo
this
.
addItemBox
(
moveInItemInfo
)
console
.
log
(
'startMoveIn:'
)
//
console.log('startMoveIn:')
const
vm
=
this
// e.preventDefault();
if
(
!
this
.
infoBox
)
{
...
...
frontend/src/views/chart/chart/chart.js
浏览文件 @
dadb1f4f
...
...
@@ -606,7 +606,7 @@ export const BASE_GAUGE = {
}
export
const
BASE_CHART_STRING
=
{
stylePriority
:
'
panel
'
,
stylePriority
:
'
view
'
,
xaxis
:
'[]'
,
yaxis
:
'[]'
,
show
:
true
,
...
...
frontend/src/views/chart/group/Group.vue
浏览文件 @
dadb1f4f
...
...
@@ -745,6 +745,7 @@ export default {
background
:
DEFAULT_BACKGROUND_COLOR
,
split
:
DEFAULT_SPLIT
})
view
.
stylePriority
=
'view'
// 默认样式优先级视图
view
.
xaxis
=
JSON
.
stringify
([])
view
.
yaxis
=
JSON
.
stringify
([])
view
.
yaxisExt
=
JSON
.
stringify
([])
...
...
frontend/src/views/panel/ViewSelect/index.vue
浏览文件 @
dadb1f4f
...
...
@@ -141,7 +141,7 @@ export default {
eventBus
.
$emit
(
'startMoveIn'
)
},
dragEnd
()
{
console
.
log
(
'dragEnd'
)
//
console.log('dragEnd')
this
.
$store
.
commit
(
'clearDragComponentInfo'
)
},
// 判断节点能否被拖拽
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
dadb1f4f
...
...
@@ -96,13 +96,14 @@
<div
id=
"canvasInfo"
class=
"this_canvas
"
:style=
"customCanvasStyle
"
:class=
"
{'style-hidden':canvasStyleData.selfAdaption}
"
class="content this_canvas
"
@drop="handleDrop"
@dragover="handleDragOver"
@mousedown="handleMouseDown"
@mouseup="deselectCurComponent"
>
<Editor
v-if=
"!previewVisible"
:out-style=
"outStyle"
@
canvasScroll=
"canvasScroll"
/>
<Editor
ref=
"canvasEditor"
v-if=
"!previewVisible"
:out-style=
"outStyle"
@
canvasScroll=
"canvasScroll"
/>
</div>
</de-main-container>
<!--
<de-aside-container
v-if=
"aidedButtonActive"
:class=
"aidedButtonActive ? 'show' : 'hidden'"
class=
"style-aside"
>
-->
...
...
@@ -790,6 +791,11 @@ export default {
}
this
.
destroyTimeMachine
()
},
1000
)
},
handleDragOver
(
e
)
{
e
.
preventDefault
()
e
.
dataTransfer
.
dropEffect
=
'copy'
this
.
$refs
.
canvasEditor
.
handleDragOver
(
e
)
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论