Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Activating Open Collective #3649

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
04e67af
changed version to v4.21.0-SNAPSHOT
yotamberk Oct 12, 2017
c56fa19
Network: fit() should not change the passed options (#3566)
wimrijnders Oct 13, 2017
f6445cd
Network: Prevent crash when dataChanged is triggered during initializ…
wimrijnders Oct 13, 2017
06b2623
Use mock canvas object replacing `canvas` (#3518)
wimrijnders Oct 13, 2017
b3f29ba
Network: Set version of FontAwesome to latest stable 4.7.0 (#3572)
wimrijnders Oct 14, 2017
08af10e
Network: preload images in options for all shape types (#3570)
wimrijnders Oct 14, 2017
1ece237
Network: Handle null data gracefully (#3571)
wimrijnders Oct 14, 2017
dfe9c40
Fix for majorLabels showing wrong dates (#3573)
knokit Oct 14, 2017
eedd022
Network: Add new Hexagon shape to shape examples (#3577)
wimrijnders Oct 18, 2017
d53042a
Removing duplicate line (#3578)
MeTaNoV Oct 18, 2017
3c48a38
Network: Fix documentation for event `stabilized` (#3582)
wimrijnders Oct 18, 2017
ca85983
Loading screen template (#3537)
yotamberk Oct 18, 2017
197f36a
Adds code coverage report the output of `npm test` and adds detailed …
macleodbroad-wf Oct 20, 2017
bc446e0
Network: Cleanup @typedef's in jsdoc comments (#3569)
wimrijnders Oct 20, 2017
7110549
Network: DRY code in Label for parsing markup (#3565)
wimrijnders Oct 20, 2017
0a6f257
Week scale - enhance and add to auto-scaling (#3549)
knokit Oct 20, 2017
24d61cb
Add template for document generation with 'jsdoc'. (#3497)
wimrijnders Oct 20, 2017
88f0a6a
Network: force array order when sorting hierarchical levels (#3576)
wimrijnders Oct 20, 2017
e74dc43
Docs: Moved end block in all html documentation files to partial (#3…
wimrijnders Oct 21, 2017
8e929e3
Moved navbar elements in all html documentation files to partial (#3604)
wimrijnders Oct 23, 2017
cdff6b1
Network feature: background style for edges (#3606)
yoavdamri Oct 23, 2017
773d593
Unit tests: upgrade jsdom to v11 to fix breaking unit tests for Netwo…
wimrijnders Oct 28, 2017
508af93
Fix currentTimeTick table in docs (#3627)
lewisjb Oct 28, 2017
bd668c5
Docs : fixes and enhancements for the documentation template. (#3596)
wimrijnders Oct 28, 2017
95657e9
Adds code-cov to develop and updates readme. (#3629)
macleodbroad-wf Oct 30, 2017
fb6872d
Adding unit tests for lib/shared (#3600)
macleodbroad-wf Nov 4, 2017
658324f
Prevent items from being repeatedly redrawn while off screen (#3633)
YoshiWalsh Nov 4, 2017
60c4675
Updated .github/ISSUE_TEMPLATE.md (optional)
asood123 Nov 6, 2017
78e67ab
Updated CONTRIBUTING.md (optional)
asood123 Nov 6, 2017
2303d4a
Added backers and sponsors on the README
asood123 Nov 6, 2017
ae83450
Added call to donate after npm install (optional)
asood123 Nov 6, 2017
da387f3
Fixes issue 3321 by ensuring labels are drawn as part of initial cons…
macleodbroad-wf Nov 6, 2017
2bf3dc5
Fixes 2584 in Develop (#3650)
macleodbroad-wf Nov 10, 2017
e2909b4
BUGFIX: No group info returned to mouse events when cursorY == group …
mimafogeus2 Nov 10, 2017
7a56869
configurable manual zoom speed (#3657)
evictor Nov 16, 2017
d64f36c
Fix initial load when options start and end are not defined (#3664)
yotamberk Nov 18, 2017
cd9562f
Fix rolling mode (#3663)
yotamberk Nov 18, 2017
387d7f3
Merge branch 'develop' into opencollective
asood123 Nov 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Please make sure to **read the following list** before creating a new issue:

* This issue tracker is not supposed to be used for questions on how to use visjs. It is intended to be used for bug reports and feature requests! In case you face yourself with a usage question, then post your question e.g. on [stackoverflow](https://stackoverflow.com/questions/tagged/vis.js) tagged with "vis.js".
Expand All @@ -8,3 +7,6 @@ Please make sure to **read the following list** before creating a new issue:
* Make sure to mention which browser and OS you are using when creating a bug report.
* Please provide a minimal code example that demonstrates your issue. We recommend using [jsbin](jsbin.com) for that.
* Delete this list from the actual issue.

<!-- Love vis? Please consider supporting our collective:
👉 https://opencollective.com/vis/donate -->
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ npm-debug.log
# temporary files
.*.sw[op]
.commits.tmp
gen/
.nyc_output/
coverage/
package-lock.json
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "6"
- "7"
env:
- CXX=g++-4.8
addons:
Expand Down
38 changes: 38 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,41 @@ If you really want to open a new issue:
* If you think you found a bug please **provide a simple example** (e.g. on [jsbin](jsbin.com)) that demonstrates the problem.
* If you want to propose a feature-request please **describe what you are looking for in detail**, ideally providing a screenshot, drawing or something similar.
* **Close the issue later**, when the issue is no longer needed.


## Financial contributions

We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/vis).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.


## Credits


### Contributors

Thank you to all the people who have already contributed to vis!
<a href="graphs/contributors"><img src="https://opencollective.com/vis/contributors.svg?width=890" /></a>


### Backers

Thank you to all our backers! [[Become a backer](https://opencollective.com/vis#backer)]

<a href="https://opencollective.com/vis#backers" target="_blank"><img src="https://opencollective.com/vis/backers.svg?width=890"></a>


### Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/vis#sponsor))

<a href="https://opencollective.com/vis/sponsor/0/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/1/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/2/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/3/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/4/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/5/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/6/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/7/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/8/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/9/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/9/avatar.svg"></a>
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vis.js


[![Backers on Open Collective](https://opencollective.com/vis/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/vis/sponsors/badge.svg)](#sponsors) [![Join the chat at https://gitter.im/vis-js/Lobby](https://badges.gitter.im/vis-js/Lobby.svg)](https://gitter.im/vis-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/vis-js/Lobby](https://badges.gitter.im/vis-js/Lobby.svg)](https://gitter.im/vis-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

<a href="https://github.com/almende/vis/blob/develop/misc/we_need_help.md">
Expand Down Expand Up @@ -38,6 +40,7 @@ The vis.js library was initially developed by [Almende B.V](http://almende.com).
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/almende/vis.svg)](http://isitmaintained.com/project/almende/vis "Average time to resolve an issue")
[![Pending Pull-Requests](http://githubbadges.herokuapp.com/almende/vis/pulls.svg)](https://github.com/almende/vis/pulls)


[![Test Coverage](https://codeclimate.com/github/almende/vis/badges/coverage.svg)](https://codeclimate.com/github/almende/vis/coverage)
[![Code Climate](https://codeclimate.com/github/almende/vis/badges/gpa.svg)](https://codeclimate.com/github/almende/vis)

Expand Down Expand Up @@ -352,6 +355,36 @@ Then run the tests:

$ npm run test

## Contributors

This project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).
<a href="graphs/contributors"><img src="https://opencollective.com/vis/contributors.svg?width=890" /></a>


## Backers

Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/vis#backer)]

<a href="https://opencollective.com/vis#backers" target="_blank"><img src="https://opencollective.com/vis/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/vis#sponsor)]

<a href="https://opencollective.com/vis/sponsor/0/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/1/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/2/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/3/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/4/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/5/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/6/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/7/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/8/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/vis/sponsor/9/website" target="_blank"><img src="https://opencollective.com/vis/sponsor/9/avatar.svg"></a>



## License

Copyright (C) 2010-2017 Almende B.V. and Contributors
Expand Down
231 changes: 231 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
# Command line usage example

```
jsdoc -c jsdoc.json -r -t docs -d gen/docs lib
```

- `-c`: use this config file for `jsdoc`
- `-r`: Recurse into subdirectories of the specified source directories
- `-t`: Use template in path `docs`
- `-d`: Generated html files put in `gen/docs`
- Source files to parse are taken from directory `lib`


## Notes

The template generation is set up so that:

- Files ending in `.tmpl` are skipped
- All non-html files are plain copied
- html-files *can* contain `<?js ?>` tags, but this is not required


## Intention

The `docs` directory is treated as a `jsdoc` template, in which the html-files are the template files. This allows for a gradual adaptation of the html-files to templates; unchanged html-files will pass through `jsdoc` unchanged.

The added value of using `jsdoc` for documentation generation, is that the complete documentation information, as collected by `jsdoc` from the source, is available for usage. This way, it's possible to insert technical notes from the source code into the documentation.

----

# Usage of and Notes on Source Code

This section contains notes on the usage of `jsdoc` functionality, to aid with the handling of its generated data.


## Parameters of `publish()`

### Parameter `taffyData`

A table containing *all* data collected from the source code, related to jsdoc generation. See below for more info and example outputs.

### Parameter `opt`

Example of `opt` variable:

```js
{
"_":["../github/vis/lib/network/"],
"configure":"jsdoc.json",
"recurse":true,
"template":"/home/wim/projects/jsdoc/default",
"destination":"./out/",
"encoding":"utf8"
}
```

### Parameter `tutorial`

This does not appear to be of use for the generation of `vis.js` documentation.

Example of `tutorial` variable:

```js
{
"longname":"",
"name":"",
"title":"",
"content":"",
"parent":null,
"children":[],
"_tutorials":{}
}
```

## Global variable `env`

This contains addition info for the current execution of `jsdoc`. Example of `env` variable:

```js
{
"run":{"start":"2017-09-16T05:06:45.621Z","finish":null},
"args":["-c","jsdoc.json","-r","-t","default","../github/vis/lib/network/"],
"conf":{
"plugins":["/usr/lib/node_modules/jsdoc/plugins/markdown.js"],
"recurseDepth":10,
"source":{"includePattern":".+\\.js(doc|x)?$","excludePattern":""},
"sourceType":"module",
"tags":{"allowUnknownTags":true,"dictionaries":["jsdoc","closure"]},
"templates":{"monospaceLinks":false,"cleverLinks":false}
},
"dirname":"/usr/lib/node_modules/jsdoc",
"pwd":"/home/wim/projects/jsdoc",
"opts":{ <<same as parameter 'opt' above>> },
"sourceFiles":[ <<list of full path names of all js-source files used as input>> ],
"version":{"number":"3.5.4","revision":"Fri, 04 Aug 2017 22:05:27 GMT"}
}
```


## taffyData

This is a parameter to `publish()`. It's a table containing *all* data collected from the source code, related to jsdoc generation.

I can't find any way to return a list of fields for the data items in the taffyDB docs, therefore below there are examples of items, for better understanding of usage.

Example usage:

```js
var data = taffyData;
var tmp = data().filter({name:'Label'}).get();
```

Returns an array with all items with `name === 'Label'`. Example output of one of these items, for a class:

*In these examples, block comment endings are redacted to ' * /'*

```js
{
"comment":"/**\n * A Label to be used for Nodes or Edges.\n * /",
"meta":{
"range":[3770,41303],
"filename":"Label.js",
"lineno":167,
"columnno":0,
"path":"/home/wim/projects/github/vis/lib/network/modules/components/shared",
"code":{
"id":"astnode100065034",
"name":"Label",
"type":"ClassDeclaration",
"paramnames":["body","options","edgelabel"]
}
},
"classdesc":"
A Label to be used for Nodes or Edges.

",
"name":"Label",
"longname":"Label",
"kind":"class",
"scope":"global",
"params":[
{"type":{"names":["Object"]},"name":"body"},
{"type":{"names":["Object"]},"name":"options"},
{"type":{"names":["boolean"]},"optional":true,"defaultvalue":false,"name":"edgelabel"}
],
"___id":"T000002R005289",
"___s":true
}
```

Example of item for an instance method:

```js
var tmp = data().filter({name:'_drawText'}).get();
```

Full output returned:

```js
[{
"comment":"/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {boolean} selected\n * @param {boolean} hover\n * @param {number} x\n * @param {number} y\n * @param {string} [baseline='middle']\n * @private\n * /",
"meta":{
"range":[20060,22269],
"filename":"Label.js",
"lineno":652,
"columnno":2,
"path":"/home/wim/projects/github/vis/lib/network/modules/components/shared",
"code":{
"id":"astnode100066427",
"name":"Label#_drawText",
"type":"MethodDefinition",
"paramnames":["ctx","selected","hover","x","y","baseline"]
},
"vars":{"":null}
},
"params":[
{"type":{"names":["CanvasRenderingContext2D"]},"name":"ctx"},
{"type":{"names":["boolean"]},"name":"selected"},
{"type":{"names":["boolean"]},"name":"hover"},
{"type":{"names":["number"]},"name":"x"},
{"type":{"names":["number"]},"name":"y"},
{"type":{"names":["string"]},"optional":true,"defaultvalue":"'middle'","name":"baseline"}
],
"access":"private",
"name":"_drawText",
"longname":"Label#_drawText",
"kind":"function",
"memberof":"Label",
"scope":"instance",
"___id":"T000002R005388",
"___s":true
}]
```

## `jsdoc` template rendering

See `function createRenderer(fromDir, data)` in code for usage.

There are two calls for rendering templates:

- `var html = renderer.render(inFile, docData);`
- `var html = renderer.partial(inFile, docData);`

The difference is that `render()` will use a default layout template, if present, which will encapsulate all html. This can be set by:

```js
renderer.layout = 'path/to/default/layout.tmpl';
```

Parameter `docData` is a hash which is used to pass parameters into a template. The standard way of using this appear to be:

```
<?js
var data = obj; // Whatever docData is
var self = this;
?>
```

But it also appear to be possible to use the elements of docData directly:

```js
var docData = {
myTitle: 'Hello, pussycat!'
};
```

Within the template:

```
<?js= myTitle ?>
```
9 changes: 9 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ td.indent2 {
padding-left:50px !important;
}

td p:first-child {
margin-top: 0;
}

td p:last-child {
margin-bottom: 0;
}


pre.options {
max-width:600px;
}
Expand Down
Loading