diff --git a/example/src/components/html-text-live-demo.js b/example/src/components/html-text-live-demo.js index 18a1694..0f94950 100644 --- a/example/src/components/html-text-live-demo.js +++ b/example/src/components/html-text-live-demo.js @@ -3,9 +3,9 @@ var React = require('react'); class HTMLTextLiveDemo extends React.Component { constructor(props) { super(props); - + this.state = { - text: 'a quick brown fox' + text: 'A quick brown fox. A quick brown fox. A quick brown fox. A quick brown fox.A quick brown fox. A quick brown fox. A quick brown fox.' }; } diff --git a/example/src/components/svg-text-live-demo.js b/example/src/components/svg-text-live-demo.js index 1d7aff4..93dd52f 100644 --- a/example/src/components/svg-text-live-demo.js +++ b/example/src/components/svg-text-live-demo.js @@ -5,9 +5,9 @@ var React = require('react'), class SVGTextLiveDemo extends React.Component { constructor(props) { super(props); - + this.state = { - text: 'a quick brown fox', + text: 'A quick brown fox. A quick brown fox. A quick brown fox. A quick brown fox.A quick brown fox. A quick brown fox. A quick brown fox.', ellipsis: true, wrap: true }; diff --git a/example/src/example.less b/example/src/example.less index 35b76b4..ff5cec1 100644 --- a/example/src/example.less +++ b/example/src/example.less @@ -110,6 +110,13 @@ label { font-weight: 500; } +.demo-instruction { + background: rgba(249, 167, 26, 0.46); + border: 1px solid #f1b650; + padding: 7px; + border-radius: 2px; +} + .fc-demo-pane-text { font-size: 12px; } diff --git a/example/src/index.html b/example/src/index.html index c306149..4a61454 100644 --- a/example/src/index.html +++ b/example/src/index.html @@ -15,21 +15,21 @@
What happens if a text is rendered in a div
which has specific height and width.
- This example uses basic html elements to render the concept. +
+ This example uses basic html elements to render the concept.
-+
What happens when the text is made long so that it can't be contained in the div
? DOM automatically breaks it and position the remaining part in the following line.
- Change the text in the textbox to see the effect. +
+ Change the text in the textbox to see the effect.
- This example uses svg elements to render the concept. +
+ This example uses svg elements to render the concept.
-+
What happens when the text is made long so that it can't be contained in the svg bound box
? Unlike the text contained in the div, it does not get wrapped automatically. This is the sole reason for label overlapping in a visualization library
- Change the text in the textbox to see the effect. +
+ Change the text in the textbox to see the effect.
- This example uses svg elements to render the concept. +
+ This example uses svg elements to render the concept.
-+
With SmartLabel
a text cant be wrapped if a bound box is defined. More over if a bound box is completely exhausted the text can be truncated with or without ellipsis.
- Change the text in the textbox to see the effect. +
+ Change the text in the textbox to see the effect.