Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render(coord, group) {
const self = this;
const position = self.parsePoint(coord, self.position);
const parentNode = group.get('canvas').get('el').parentNode;
const wrapperNode = DomUtil.createDom('<div class="g-guide"></div>');
parentNode.appendChild(wrapperNode);
let html = self.html;
if (Util.isFunction(html)) {
html = html(self.xScales, self.yScales);
}
const htmlNode = DomUtil.createDom(html);
wrapperNode.appendChild(htmlNode);
self._setDomPosition(wrapperNode, htmlNode, position);
self.el = wrapperNode;
}
render(coord, group) {
const self = this;
const position = self.parsePoint(coord, self.position);
const parentNode = group.get('canvas').get('el').parentNode;
const wrapperNode = DomUtil.createDom('<div class="g-guide"></div>');
parentNode.appendChild(wrapperNode);
let html = self.html;
if (Util.isFunction(html)) {
html = html(self.xScales, self.yScales);
}
const htmlNode = DomUtil.createDom(html);
wrapperNode.appendChild(htmlNode);
self._setDomPosition(wrapperNode, htmlNode, position);
self.el = wrapperNode;
}