|
@@ -415,6 +415,29 @@ export default defineComponent({
|
|
|
{ deep: true }
|
|
|
);
|
|
|
|
|
|
+ watch(
|
|
|
+ () => store.setting.mode,
|
|
|
+ () => {
|
|
|
+ const shouldHide = store.setting.mode === ModeEnum.COMMON;
|
|
|
+ if (shouldHide) {
|
|
|
+ // console.log("hide cursor", theCursor);
|
|
|
+ theCursor && theCursor.destroy();
|
|
|
+ } else {
|
|
|
+ if (document.querySelector(".cursor")) {
|
|
|
+ // console.log("show cursor", theCursor);
|
|
|
+ // theCursor && theCursor.enable();
|
|
|
+ theCursor = new CustomCursor(".cursor", {
|
|
|
+ focusElements: [
|
|
|
+ {
|
|
|
+ selector: ".mark-body-container",
|
|
|
+ focusClass: "cursor--focused-view",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }).initialize();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
let theCursor = null as any;
|
|
|
onMounted(() => {
|
|
|
if (store.setting.mode === ModeEnum.TRACK) {
|
|
@@ -464,6 +487,10 @@ export default defineComponent({
|
|
|
border: 2px solid rgba(120, 120, 120, 0.1);
|
|
|
}
|
|
|
|
|
|
+.hide-cursor {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
+
|
|
|
.cursor {
|
|
|
color: #ff5050;
|
|
|
display: none;
|