perf: 直线选中范围优化

This commit is contained in:
pipipi-pikachu 2022-01-15 11:19:33 +08:00
parent 3ec22182ab
commit 61679c8157

View File

@ -35,6 +35,7 @@
/> />
</defs> </defs>
<path <path
class="line-point"
:d="path" :d="path"
:stroke="elementInfo.color" :stroke="elementInfo.color"
:stroke-width="elementInfo.width" :stroke-width="elementInfo.width"
@ -128,10 +129,13 @@ export default defineComponent({
<style lang="scss" scoped> <style lang="scss" scoped>
.editable-element-shape { .editable-element-shape {
position: absolute; position: absolute;
pointer-events: none;
&.lock .line-path { &.lock {
.line-path, .line-point {
cursor: default; cursor: default;
} }
}
} }
.element-content { .element-content {
@ -144,7 +148,8 @@ export default defineComponent({
overflow: visible; overflow: visible;
} }
} }
.line-path { .line-path, .line-point {
pointer-events: all;
cursor: move; cursor: move;
} }
</style> </style>