|
@@ -412,21 +412,27 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- /* generate outline left nodes */
|
|
|
- var options = timeline.getOptions();
|
|
|
- var headerElement = document.getElementById('outline-header');
|
|
|
- headerElement.style.maxHeight = headerElement.style.minHeight = options.headerHeight + 'px';
|
|
|
- // headerElement.style.backgroundColor = options.headerFillColor;
|
|
|
-
|
|
|
- rows.forEach(function (row, index) {
|
|
|
- var div = document.createElement('div');
|
|
|
- div.classList.add('outline-node');
|
|
|
- div.style.maxHeight = div.style.minHeight = (row.height || options.rowsStyle.height) + 'px';
|
|
|
- div.style.marginBottom = options.rowsStyle.marginBottom + 'px';
|
|
|
- div.innerText = row.title || 'Track ' + index;
|
|
|
- outlineContainer.appendChild(div);
|
|
|
- });
|
|
|
+ generateHTMLOutlineListNodes(rows);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Generate html for the left menu for each row.
|
|
|
+ * */
|
|
|
+ function generateHTMLOutlineListNodes(rows) {
|
|
|
+ var options = timeline.getOptions();
|
|
|
+ var headerElement = document.getElementById('outline-header');
|
|
|
+ headerElement.style.maxHeight = headerElement.style.minHeight = options.headerHeight + 'px';
|
|
|
+ // headerElement.style.backgroundColor = options.headerFillColor;
|
|
|
+
|
|
|
+ rows.forEach(function (row, index) {
|
|
|
+ var div = document.createElement('div');
|
|
|
+ div.classList.add('outline-node');
|
|
|
+ div.style.maxHeight = div.style.minHeight = (row.height || options.rowsStyle.height) + 'px';
|
|
|
+ div.style.marginBottom = options.rowsStyle.marginBottom + 'px';
|
|
|
+ div.innerText = row.title || 'Track ' + index;
|
|
|
+ outlineContainer.appendChild(div);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/*Handle events from html page*/
|
|
|
function selectMode() {
|
|
|
if (timeline) {
|