@exakt/ui 0.0.59 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -112,10 +112,13 @@ const updatePosition = async () => {
|
|
|
112
112
|
state.y = Math.round(activatorRect.height);
|
|
113
113
|
state.x = 0;
|
|
114
114
|
|
|
115
|
-
//
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
//Too far right :(
|
|
116
|
+
console.log(list.value);
|
|
117
|
+
if (list.value) {
|
|
118
|
+
if (window?.innerWidth > list.value?.getBoundingClientRect().right) {
|
|
119
|
+
state.x = -1 * activatorRect.width;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
119
122
|
} //else{
|
|
120
123
|
//console.log(activator.value, list.value)
|
|
121
124
|
//}
|
|
@@ -130,6 +133,19 @@ const updatePosition = async () => {
|
|
|
130
133
|
} */
|
|
131
134
|
};
|
|
132
135
|
|
|
136
|
+
watch(
|
|
137
|
+
() => list.value,
|
|
138
|
+
(newList) => {
|
|
139
|
+
const activatorRect = activator.value?.getBoundingClientRect();
|
|
140
|
+
|
|
141
|
+
if (newList && activatorRect) {
|
|
142
|
+
if (window?.innerWidth < newList.getBoundingClientRect().right) {
|
|
143
|
+
state.x = -1 * activatorRect.width * 2;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
);
|
|
148
|
+
|
|
133
149
|
const debouncedUpdatePosition = debounce(updatePosition, 200);
|
|
134
150
|
|
|
135
151
|
watch(visibleComputed, (value) => {
|