leader-line
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "leader-line", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Draw a leader line in your web page.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
{ | ||
"name": "leader-line", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"title": "LeaderLine", | ||
@@ -23,15 +23,15 @@ "description": "Draw a leader line in your web page.", | ||
"devDependencies": { | ||
"anim-event": "^1.0.15", | ||
"cheerio": "^1.0.0-rc.2", | ||
"clean-css": "^4.1.9", | ||
"grunt": "^1.0.2", | ||
"anim-event": "^1.0.16", | ||
"cheerio": "^1.0.0-rc.9", | ||
"clean-css": "^5.1.2", | ||
"grunt": "^1.4.1", | ||
"grunt-task-helper": "^0.3.10", | ||
"htmlclean": "^3.0.8", | ||
"jasmine-core": "^2.99.1", | ||
"log4js": "^2.5.3", | ||
"node-static-alias": "^1.0.0", | ||
"plain-draggable": "^2.0.24", | ||
"pre-proc": "^0.2.8", | ||
"test-page-loader": "1.0.7", | ||
"uglify-js": "^3.3.11" | ||
"jasmine-core": "^3.7.1", | ||
"log4js": "^6.3.0", | ||
"node-static-alias": "^1.1.2", | ||
"plain-draggable": "^2.5.12", | ||
"pre-proc": "^1.0.2", | ||
"test-page-loader": "^1.0.8", | ||
"uglify-js": "^3.13.7" | ||
}, | ||
@@ -38,0 +38,0 @@ "scripts": { |
@@ -15,3 +15,3 @@ # LeaderLine | ||
```js | ||
// Add new leader line from `start` to `end` (HTML/SVG elements, basically). | ||
// Add new leader line from `start` to `end` (HTML/SVG element, basically). | ||
new LeaderLine( | ||
@@ -29,3 +29,3 @@ document.getElementById('start'), | ||
Basically, it can indicate HTML/SVG elements such as `<div>`, `<button>`, `<ul>`, `<td>`, `<circle>`, `<text>`, etc. | ||
Basically, it can indicate HTML/SVG element such as `<div>`, `<button>`, `<ul>`, `<td>`, `<circle>`, `<text>`, etc. | ||
@@ -207,2 +207,18 @@ [![ex-021](img/ex-021.png)](https://anseki.github.io/leader-line/) | ||
When you will do something about HTML document regardless of the LeaderLine, you typically do that after the HTML document is ready (i.e. the HTML document has been loaded and parsed by web browser). | ||
For example: | ||
```js | ||
// Wait for HTML document to get ready | ||
window.addEventListener('load', function() { // NOT `DOMContentLoaded` | ||
// Do something about HTML document | ||
var line = new LeaderLine( | ||
document.getElementById('start'), | ||
document.getElementById('end') | ||
); | ||
}); | ||
``` | ||
If you don't wait for HTML document to be ready, you might not be able to get a target element yet, or problems with incomplete layout may occur. Also, you should do so asynchronous like the above for the performance because synchronous code blocks parsing HTML. | ||
### `hide` option | ||
@@ -1292,2 +1308,4 @@ | ||
Note that the characters are put along the path of the leader line from the [`start`](#start-end) element toward the [`end`](#start-end) element even if the path curves sharply or it is drawn toward the left. If you have to avoid those cases for important text, use [`captionLabel`](#captionlabel) instead. | ||
#### `text` | ||
@@ -1294,0 +1312,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147788
1395