sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
17 lines • 1.27 kB
JavaScript
import { HTMLComponent } from "../HtmlComponent";
export class ArrowComponent extends HTMLComponent {
constructor(ParenComponent, arrowStyle) {
let baseCssClass = "componentFrontArrow"; //default
if (arrowStyle == "<svg data-name=\"Calque 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 48.000001\"><defs></defs><path class=\"cls-1\" d=\"M 18.008733,1.5080381 6.6838121,1.5024032 c 0,0 -2.7510996,0.04416 -4.2115752,1.5946504 -2.02680282,2.1517235 -0.2098002,4.361739 -0.2098002,4.361739 0,0 8.2984163,9.9121154 11.7095953,13.1759434 1.225377,1.172444 1.678616,2.314014 1.658747,3.289995 l 0.0038,0.312891 c 0.01988,0.975981 -0.357679,2.113567 -1.583053,3.28601 C 10.640342,30.78746 2.2971761,40.70739 2.2971761,40.70739 c 0,0 -1.96022402,2.586197 0.363389,4.448506 1.7469044,1.400093 3.8753989,1.339578 3.8753989,1.339578 l 11.468674,0.0044\"/></svg>" /* UiuxConfig.COMPONENT_ARROW_BACK */)
baseCssClass = "componentBackArrow";
super(baseCssClass, ParenComponent, null);
this.arrowStyle = arrowStyle;
this.widgetHtml = $(arrowStyle);
}
render() {
// if it's a Front Arrow then prepend the html
super.render();
return this;
}
}
//# sourceMappingURL=ArrowComponent.js.map