Skip to content

Commit 86c0f08

Browse files
committed
added onRender callback
1 parent 110362d commit 86c0f08

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ <h2>
7878
},
7979
onAddClick: function(dt, rowId) {
8080
alert("Empty space clicked - add an item!");
81+
},
82+
onRender: function() {
83+
console.log("chart rendered");
8184
}
8285
});
8386
</pre>
@@ -213,6 +216,14 @@ <h2>
213216
<td>
214217
a JS Function that gets called when clicking on a Gantt-Item. <br />The parameter passed to the function is the DateTime in ms for the clicked Cell, and the ID if the source object (row)</td>
215218
</tr>
219+
<tr>
220+
<td>
221+
<code>onRender</code></td>
222+
<td>
223+
<code>function () { return; }</code></td>
224+
<td>
225+
a JS Function called whenever the chart is (re)rendered</td>
226+
</tr>
216227
<tr>
217228
<td>
218229
<code>useCookie</code></td>
@@ -519,6 +530,11 @@ <h2>
519530
},
520531
onAddClick: function(dt, rowId) {
521532
alert("Empty space clicked - add an item!");
533+
},
534+
onRender: function() {
535+
if (window.console && typeof console.log === "function") {
536+
console.log("chart rendered");
537+
}
522538
}
523539
});
524540

js/jquery.fn.gantt.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
waitText: "Please wait...",
2525
onItemClick: function (data) { return; },
2626
onAddClick: function (data) { return; },
27+
onRender: function() { return; },
2728
scrollToToday: true
2829
};
2930

@@ -248,6 +249,7 @@
248249

249250
$dataPanel.css({ height: $leftPanel.height() });
250251
core.waitToggle(element, false);
252+
settings.onRender();
251253
},
252254
leftPanel: function (element) {
253255
/* Left panel */

0 commit comments

Comments
 (0)