OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/frontend/app/components/wp-table/timeline/global-elements/timeline-static-element.ts

28 lines
848 B

import {TimelineViewParameters} from "../wp-timeline";
export const timelineStaticElementCssClassname = "wp-timeline--static-element";
export abstract class TimelineStaticElement {
constructor() {
}
/**
* Render the static element according to the current ViewParameters
* @param vp Current timeline view paraemters
* @returns {HTMLElement} The finished static element
*/
public render(vp:TimelineViewParameters):HTMLElement {
const elem = document.createElement("div");
elem.id = this.identifier;
elem.classList.add(...this.classNames);
return this.finishElement(elem, vp);
}
protected abstract finishElement(elem:HTMLElement, vp:TimelineViewParameters):HTMLElement;
public abstract get identifier():string;
public get classNames():string[] {
return [timelineStaticElementCssClassname];
}
}