Comments (1)
Text from #105:
@wheelerlaw I agree, the old 1.0 logic of detecting the size, positioning, and text of a label based on the DOM structure was super handy. I don't have the capacity right now to port it over, but ideally the logic would be:
If the data passed to textWrap
is an HTMLELement
or D3Selection
:
- Analyze the shape to determine the
width
,height
,x
, andy
properties - Analyze any available sibling
<text>
element to determine thetext
and any inline font styles
The old logic for parsing the size can be found here, and the old logic for text is here. These are both used here. The old code is in coffeescript 😒
Consider these either notes for my future self, or guidance for someone to make a PR 🍻
from d3plus-text.
Related Issues (20)
- add support for italic labels HOT 1
- An in-range update of d3-array is breaking the build 🚨 HOT 1
- Latest changes for 0.9.36 cause text not to render
- An in-range update of d3plus-common is breaking the build 🚨 HOT 1
- detect data from pre-existing DOM elements HOT 3
- Improve wrapping behavior - break mid-word
- textSplit should not filter out all emoji unicode chars HOT 1
- textbox split property should pass through into textWrap.
- D3 and existing SVGs HOT 1
- Pipe character "|" stripped from text
- textWrap issue with overflow and long text HOT 12
- Text is not rendered in IE11 HOT 3
- Click event on wrapped text not triggering on Safari
- add macron detection to textStrip
- Docs and examples seems to be offline HOT 2
- error: transition 1 not found HOT 3
- fontExists always returning false with custom fonts HOT 1
- implement tuncateWord method
- Japanese language should be included in noSpaceRange HOT 2
- add ability to selectively turn off fontExists caching as part of TextBox HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3plus-text.