sparnatural
Version:
Visual client-side SPARQL query builder and knowledge graph exploration tool
24 lines • 1.18 kB
JavaScript
import { HTMLComponent } from "../HtmlComponent";
import { I18n } from "../../settings/I18n";
export class ResetBtn extends HTMLComponent {
constructor(ParentComponent, callBack) {
let widgetHtml = $(`<p class="reset-form"><a title="${I18n.labels["Reset.tooltip"]}">${"<svg id=\"icon_reset\" data-name=\"icon_reset\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 15 15\"><defs></defs><path class=\"cls-1\" d=\"M11.93,8.46A4.25,4.25,0,1,1,10.34,4.4\"/><polyline class=\"cls-1\" points=\"8.56 5.29 10.58 4.65 9.94 2.63\"/></svg>" /* UiuxConfig.ICON_RESET */}</a></p>`);
super("reset-wrapper", ParentComponent, widgetHtml);
this.widgetHtml.on("click", (e) => {
callBack();
});
// set a tooltip on the reset button
/*
this.tippySettings = Object.assign({}, TOOLTIP_CONFIG);
this.tippySettings.placement = 'right-start';
this.tippySettings.offset = [-15, -54];
this.tippySettings.delay = [300, 0];
*/
}
render() {
super.render();
// new TippyInfo(this, "blah blah", this.tippySettings);
return this;
}
}
//# sourceMappingURL=ResetBtn.js.map