Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Ungrouped Area #1796

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: clean-up code
Andrei Corpodeanu committed Apr 29, 2024
commit 27c3cd297c232586d211cc16514b9d4ce33b2c28
1 change: 0 additions & 1 deletion lib/timeline/Timeline.js
Original file line number Diff line number Diff line change
@@ -165,7 +165,6 @@ export default class Timeline extends Core {
this.components.push(this.currentTime);

// item set
console.log("itemset init", this.options);
this.itemSet = new ItemSet(this.body, this.options);
this.components.push(this.itemSet);

9 changes: 0 additions & 9 deletions lib/timeline/component/Group.js
Original file line number Diff line number Diff line change
@@ -366,10 +366,6 @@ class Group {
* @private
*/
_redrawItems(forceRestack, lastIsVisible, margin, range) {
const cond = this.groupId !== UNGROUPED;
// if (cond) {
// console.log("Group: redraw items", this.groupId, this)
// }
const restack =
forceRestack || this.stackDirty || (this.isVisible && !lastIsVisible);

@@ -433,10 +429,6 @@ class Group {
return visibleSubgroupsItems;
};

// if(cond) {
// console.log("visible items", getVisibleItems())
// }

if (typeof this.itemSet.options.order === "function") {
// a custom order function
//show all items
@@ -761,7 +753,6 @@ class Group {
}

if (!this.dom.ungrouped.parentNode && this.groupId === UNGROUPED) {
console.log(this);
this.itemSet.dom.ungrouped.appendChild(this.dom.ungrouped);
}

4 changes: 0 additions & 4 deletions lib/timeline/component/ItemSet.js
Original file line number Diff line number Diff line change
@@ -436,7 +436,6 @@ class ItemSet extends Component {
* If not implemented, the item will be always removed.
*/
setOptions(options) {
console.log("Item set opts", options);
if (options) {
// copy all options that we know
const fields = [
@@ -685,13 +684,11 @@ class ItemSet extends Component {
}

if (!this.dom.ungrouped.parentNode && this.options.showUngroupedItems) {
console.log("1 Using ungroupedHeaderTemplate", this.options);
this.dom.ungroupedHeader.style.position = "sticky";
this.dom.ungroupedHeader.style.top = "0";
this.dom.ungroupedHeader.style.left = "0";
this.dom.ungroupedHeader.style.zIndex = "99";
if (this.options.ungroupedHeaderTemplate) {
console.log("Using ungroupedHeaderTemplate", this.options);
const templateFunction =
this.options.ungroupedHeaderTemplate.bind(this);
const content = templateFunction(this.dom.ungroupedHeader);
@@ -719,7 +716,6 @@ class ItemSet extends Component {
this.dom.ungroupedHeader.style.padding = "8px";
this.dom.ungroupedHeader.style.backgroundColor = "white";
this.dom.ungroupedHeader.addEventListener("click", (e) => {
console.log("clicked", e, this, this.body.dom.bottom.style.height);
if (!this.dom.ungrouped.style.height) {
this.dom.ungrouped.style.height = "250px";
} else {