d3plus / d3plus-text

A smart SVG text box with line wrapping and automatic font size scaling.
MIT License
105 stars 19 forks source link

Click event on wrapped text not triggering on Safari #116

Open sharathc10 opened 4 years ago

sharathc10 commented 4 years ago

Expected Behavior

Have the following markup in Angular 8 <svg [id]="'wrap' + node.id" (click)="onCick($event)" [ngClass]="{'givenNodeTextInLogic': node.uiData.parentId}">

with the following D3plus statement to enable word wrapping: import * as D3PlusText from 'd3plus-text';

new D3PlusText.TextBox() .data(nodeData) .fontSize(fontSize) .select('#wrap' + node.id) .verticalAlign('middle') .x(node.x) .y(node.y) .height(nodeHeight) .width(nodeWidth) .textAnchor('middle') .render();

Current Behavior

When user clicks on the wrapped text, the click event is not recognized in Safari. This is not a problem in Chrome. I tried adding this as well but didn't help: D3.select('#wrap' + node.id).on('click', function...)

Steps to Reproduce (for bugs)

see above

Your Environment