22category : examples
33group : gantt
44title : Gantt DataZoomAxis Scrollbar
5- cover :
5+ cover : https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/gantt-zoom-axis.gif
66link : gantt/datazoom
77option : Gantt#zoomScale.dataZoomAxis
88---
@@ -31,8 +31,8 @@ let ganttInstance;
3131
3232// Force cleanup of all possible existing zoom control panels
3333// First try to call any previously existing global cleanup function
34- if (typeof window .cleanupZoomControls === ' function' ) {
35- window .cleanupZoomControls ();
34+ if (typeof window .cleanupControls === ' function' ) {
35+ window .cleanupControls ();
3636}
3737
3838const existingControls = document .getElementById (' zoom-controls' );
@@ -717,9 +717,6 @@ const option = {
717717ganttInstance = new VTableGantt.Gantt (document .getElementById (CONTAINER_ID ), option);
718718window [' ganttInstance' ] = ganttInstance;
719719
720- // Ensure ganttInstance can be properly cleaned by document system
721- window [CONTAINER_ID ] = ganttInstance;
722-
723720/**
724721 * Create zoom control buttons
725722 */
@@ -729,8 +726,8 @@ function createZoomControls(ganttInstance) {
729726 controlsContainer .id = ' zoom-controls' ;
730727 controlsContainer .style .cssText = `
731728 position: fixed;
732- top: 180px ;
733- right: 20px ;
729+ bottom: 0px ;
730+ left: 130px ;
734731 display: flex;
735732 gap: 8px;
736733 flex-direction: column;
@@ -1033,5 +1030,5 @@ ganttInstance.release = function () {
10331030};
10341031
10351032// Store cleanup function globally for other places to call
1036- window.cleanupZoomControls = cleanup;
1033+ window.cleanupControls = cleanup;
10371034` ` `
0 commit comments