优化 pivot 体验
This commit is contained in:
parent
ce90f9df4b
commit
0f8859c922
@ -20,7 +20,7 @@
|
||||
<PivotView />
|
||||
<transition name="main-fade">
|
||||
<MovingPivotVue
|
||||
v-show="MovingPivot.show"
|
||||
v-show="MovingPivot.show && !MovingPivot.dragEnable"
|
||||
/>
|
||||
</transition>
|
||||
|
||||
@ -52,7 +52,7 @@ function onMousedown() {
|
||||
updateWireCurrentValue();
|
||||
changeCursorLocation();
|
||||
|
||||
console.log('enter');
|
||||
console.log(MovingPivot);
|
||||
|
||||
// 关闭所有
|
||||
for (const id of UserPivotCtxShows.keys()) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
@mouseleave="onLeave()"
|
||||
@contextmenu.prevent="handleUserContextMenu($event)"
|
||||
class="user-pivot"
|
||||
:style="userPivotStyle"
|
||||
>
|
||||
<div
|
||||
class="vertical-cursor-wrapper"
|
||||
@ -102,12 +103,16 @@ const props = defineProps({
|
||||
const currentColor = computed(() => {
|
||||
if (props.id === currentPivotId.value) {
|
||||
const rgbColor = parseColor(props.color);
|
||||
const brighterColor = increaseBrightness(rgbColor, 10);
|
||||
const brighterColor = increaseBrightness(rgbColor, 20);
|
||||
return `rgb(${brighterColor.r}, ${brighterColor.g}, ${brighterColor.b})`;
|
||||
}
|
||||
return props.color;
|
||||
});
|
||||
|
||||
const userPivotStyle = computed(() => ({
|
||||
cursor: vline.dragEnable ? 'ew-resize': 'pointer'
|
||||
}));
|
||||
|
||||
const colorStyle = computed(() => ({
|
||||
backgroundColor: currentColor.value
|
||||
}));
|
||||
@ -198,8 +203,8 @@ function onVLineMouseup() {
|
||||
currentPivotId.value = 0;
|
||||
vline.originTime = 0;
|
||||
vline.dragEnable = false;
|
||||
MovingPivot.currentTakenPivot = pivot;
|
||||
MovingPivot.show = false;
|
||||
// MovingPivot.currentTakenPivot = pivot;
|
||||
// MovingPivot.show = false;
|
||||
}
|
||||
|
||||
const contextmenu = reactive({
|
||||
|
Loading…
x
Reference in New Issue
Block a user