@@ -73,8 +104,36 @@ defineExpose({
width: 0px !important;
height: 0px !important;
}
+.ruler-vertical {
+ position: absolute;
+ left: 30px;
+ top: 30px;
+ transform-origin: top left;
+ transform: rotate(90deg);
+ overflow-y: auto;
+ overflow-x: hidden;
+ z-index: 1;
+ .ruler {
+ .ruler-line {
+ top: 0;
+ }
+ .ruler-tick {
+ top: 0;
+ .tick-label {
+ transform: rotate(180deg);
+ }
+ }
+ }
+}
+
+.ruler-shadow {
+ position: absolute;
+ height: 30px;
+ z-index: 10;
+ overflow: hidden;
+}
+
.ruler-outer {
- width: 100%;
overflow-x: auto;
background-color: #2c2c2c;
}
diff --git a/core/core-frontend/src/custom-component/common/DeRulerVertical.vue b/core/core-frontend/src/custom-component/common/DeRulerVertical.vue
new file mode 100644
index 0000000000..1c83edb05a
--- /dev/null
+++ b/core/core-frontend/src/custom-component/common/DeRulerVertical.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue
index 8bd5e7314a..b184c4ca81 100644
--- a/core/core-frontend/src/views/data-visualization/index.vue
+++ b/core/core-frontend/src/views/data-visualization/index.vue
@@ -65,6 +65,7 @@ const contextmenuStore = contextmenuStoreWithOut()
const composeStore = composeStoreWithOut()
const canvasCacheOutRef = ref(null)
const deWRulerRef = ref(null)
+const deHRulerRef = ref(null)
const {
fullscreenFlag,
@@ -82,6 +83,7 @@ const canvasInner = ref(null)
const leftSidebarRef = ref(null)
const dvLayout = ref(null)
const canvasCenterRef = ref(null)
+const mainHeight = ref(300)
const state = reactive({
datasetTree: [],
scaleHistory: null,
@@ -179,9 +181,9 @@ const initScroll = () => {
nextTick(() => {
const { width, height } = canvasStyleData.value
const mainWidth = canvasCenterRef.value.clientWidth
- const mainHeight = canvasCenterRef.value.clientHeight
+ mainHeight.value = canvasCenterRef.value.clientHeight
const scrollX = (1.5 * width - mainWidth) / 2
- const scrollY = (1.5 * height - mainHeight) / 2 + 20
+ const scrollY = (1.5 * height - mainHeight.value) / 2 + 20
// 设置画布初始滚动条位置
canvasOut.value.scrollTo(scrollX, scrollY)
})
@@ -361,7 +363,9 @@ const viewsPropertiesShow = computed(
const scrollCanvas = e => {
deWRulerRef.value.rulerScroll(e)
+ deHRulerRef.value.rulerScroll(e)
}
+
eventBus.on('handleNew', handleNew)
@@ -393,7 +397,13 @@ eventBus.on('handleNew', handleNew)
+
+
+
+
+
+