@design.estate/dees-wcctools 1.0.99 → 1.0.101
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_bundle/bundle.js +10 -6
- package/dist_bundle/bundle.js.map +2 -2
- package/dist_ts_web/00_commitinfo_data.js +2 -2
- package/dist_ts_web/elements/wcc-dashboard.d.ts +4 -2
- package/dist_ts_web/elements/wcc-dashboard.js +13 -9
- package/dist_watch/bundle.js +224 -5
- package/dist_watch/bundle.js.map +3 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/wcc-dashboard.ts +17 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-wcctools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.101",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.",
|
|
6
6
|
"exports": {
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-wcctools',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.101',
|
|
7
7
|
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
|
|
8
8
|
}
|
|
@@ -38,11 +38,9 @@ export class WccDashboard extends DeesElement {
|
|
|
38
38
|
@property()
|
|
39
39
|
public warning: string = null;
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
@property()
|
|
45
|
-
public sidebarScrollY: number = 0;
|
|
41
|
+
private frameScrollY: number = 0;
|
|
42
|
+
private sidebarScrollY: number = 0;
|
|
43
|
+
private scrollPositionsApplied: boolean = false;
|
|
46
44
|
|
|
47
45
|
@queryAsync('wcc-frame')
|
|
48
46
|
public wccFrame: Promise<WccFrame>;
|
|
@@ -220,8 +218,14 @@ export class WccDashboard extends DeesElement {
|
|
|
220
218
|
}
|
|
221
219
|
|
|
222
220
|
private scrollUpdateTimeout: NodeJS.Timeout;
|
|
221
|
+
private scrollListenersAttached: boolean = false;
|
|
223
222
|
|
|
224
223
|
public async setupScrollListeners() {
|
|
224
|
+
// Prevent duplicate listeners
|
|
225
|
+
if (this.scrollListenersAttached) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
225
229
|
const wccFrame = await this.wccFrame;
|
|
226
230
|
const wccSidebar = this.shadowRoot.querySelector('wcc-sidebar');
|
|
227
231
|
|
|
@@ -231,6 +235,7 @@ export class WccDashboard extends DeesElement {
|
|
|
231
235
|
this.frameScrollY = wccFrame.scrollTop;
|
|
232
236
|
this.debouncedScrollUpdate();
|
|
233
237
|
});
|
|
238
|
+
this.scrollListenersAttached = true;
|
|
234
239
|
}
|
|
235
240
|
|
|
236
241
|
if (wccSidebar) {
|
|
@@ -268,6 +273,11 @@ export class WccDashboard extends DeesElement {
|
|
|
268
273
|
}
|
|
269
274
|
|
|
270
275
|
public async applyScrollPositions() {
|
|
276
|
+
// Only apply scroll positions once to avoid interfering with user scrolling
|
|
277
|
+
if (this.scrollPositionsApplied) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
|
|
271
281
|
const wccFrame = await this.wccFrame;
|
|
272
282
|
const wccSidebar = this.shadowRoot.querySelector('wcc-sidebar');
|
|
273
283
|
|
|
@@ -280,5 +290,7 @@ export class WccDashboard extends DeesElement {
|
|
|
280
290
|
// The sidebar element itself is the scrollable container
|
|
281
291
|
wccSidebar.scrollTop = this.sidebarScrollY;
|
|
282
292
|
}
|
|
293
|
+
|
|
294
|
+
this.scrollPositionsApplied = true;
|
|
283
295
|
}
|
|
284
296
|
}
|