Browse Source

Merge branch 'develop' of https://github.com/almende/vis into develop

css_transitions
Alex de Mulder 10 years ago
parent
commit
8e436ea06e
11 changed files with 48 additions and 27 deletions
  1. +1
    -0
      .npmignore
  2. +7
    -1
      HISTORY.md
  3. +1
    -0
      bower.json
  4. +2
    -1
      dist/vis.css
  5. +6
    -5
      dist/vis.js
  6. +1
    -1
      dist/vis.min.css
  7. +4
    -4
      dist/vis.min.js
  8. +18
    -9
      docs/timeline.html
  9. +4
    -3
      src/graph/Graph.js
  10. +2
    -2
      src/timeline/component/ItemSet.js
  11. +2
    -1
      src/timeline/component/css/item.css

+ 1
- 0
.npmignore View File

@ -1,3 +1,4 @@
misc
node_modules node_modules
src src
test test

+ 7
- 1
HISTORY.md View File

@ -2,7 +2,7 @@ vis.js history
http://visjs.org http://visjs.org
## 2014-03-05, version 0.6.1
## 2014-03-06, version 0.6.1
### Graph ### Graph
@ -11,6 +11,12 @@ http://visjs.org
- Tweaked graphviz example physics. - Tweaked graphviz example physics.
- Updated physics documentation to stress importance of configurePhysics. - Updated physics documentation to stress importance of configurePhysics.
### Timeline
- Fixed a bug with options `margin.axis` and `margin.item` being ignored when setting them to zero.
- Some clarifications in the documentation.
## 2014-03-05, version 0.6.0 ## 2014-03-05, version 0.6.0
### Graph ### Graph

+ 1
- 0
bower.json View File

@ -8,6 +8,7 @@
"url": "git://github.com/almende/vis.git" "url": "git://github.com/almende/vis.git"
}, },
"ignore": [ "ignore": [
"misc",
"node_modules", "node_modules",
"src", "src",
"test", "test",

+ 2
- 1
dist/vis.css View File

@ -143,7 +143,8 @@
background: none; background: none;
} }
.vis.timeline .dot {
.vis.timeline .dot,
.vis.timeline .item.dot {
padding: 0; padding: 0;
border: 5px solid #97B0F8; border: 5px solid #97B0F8;
position: absolute; position: absolute;

+ 6
- 5
dist/vis.js View File

@ -5504,8 +5504,8 @@ ItemSet.prototype.getAxis = function getAxis() {
ItemSet.prototype.reflow = function reflow () { ItemSet.prototype.reflow = function reflow () {
var changed = 0, var changed = 0,
options = this.options, options = this.options,
marginAxis = options.margin && options.margin.axis || this.defaultOptions.margin.axis,
marginItem = options.margin && options.margin.item || this.defaultOptions.margin.item,
marginAxis = (options.margin && 'axis' in options.margin) ? options.margin.axis : this.defaultOptions.margin.axis,
marginItem = (options.margin && 'item' in options.margin) ? options.margin.item : this.defaultOptions.margin.item,
update = util.updateProperty, update = util.updateProperty,
asNumber = util.option.asNumber, asNumber = util.option.asNumber,
asSize = util.option.asSize, asSize = util.option.asSize,
@ -17583,9 +17583,10 @@ Graph.prototype._animationStep = function() {
this.renderTime = Date.now() - renderTime; this.renderTime = Date.now() - renderTime;
}; };
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
}
/** /**
* Schedule a animation step with the refreshrate interval. * Schedule a animation step with the refreshrate interval.

+ 1
- 1
dist/vis.min.css
File diff suppressed because it is too large
View File


+ 4
- 4
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 18
- 9
docs/timeline.html View File

@ -216,13 +216,13 @@ var items = [
<td>no</td> <td>no</td>
<td>This field is optional. A className can be used to give items <td>This field is optional. A className can be used to give items
an individual css style. For example, when an item has className an individual css style. For example, when an item has className
'red', one can define a css style
<code>
.red {
background-color: red;
border-color: dark-red;
}
</code>.
'red', one can define a css style like:
<pre class="prettyprint lang-css">
.vis.timeline .red {
color: white;
background-color: red;
border-color: darkred;
}</pre>
More details on how to style items can be found in the section More details on how to style items can be found in the section
<a href="#Styles">Styles</a>. <a href="#Styles">Styles</a>.
</td> </td>
@ -310,7 +310,10 @@ var groups = [
<pre class="prettyprint lang-js"> <pre class="prettyprint lang-js">
var options = { var options = {
width: '100%', width: '100%',
height: '30px'
height: '30px',
margin: {
item: 20
}
}; };
</pre> </pre>
@ -476,7 +479,13 @@ var options = {
<td>Number</td> <td>Number</td>
<td>5</td> <td>5</td>
<td>The padding of items, needed to correctly calculate the size <td>The padding of items, needed to correctly calculate the size
of item ranges. Must correspond with the css of item ranges.</td>
of item ranges. Must correspond with the css of items, for example when setting <code>options.padding=10</code>, corresponding css is:
<pre class="prettyprint lang-css">
.vis.timeline .item {
padding: 10px;
}
</pre>
</td>
</tr> </tr>
<tr> <tr>

+ 4
- 3
src/graph/Graph.js View File

@ -1812,9 +1812,10 @@ Graph.prototype._animationStep = function() {
this.renderTime = Date.now() - renderTime; this.renderTime = Date.now() - renderTime;
}; };
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
}
/** /**
* Schedule a animation step with the refreshrate interval. * Schedule a animation step with the refreshrate interval.

+ 2
- 2
src/timeline/component/ItemSet.js View File

@ -446,8 +446,8 @@ ItemSet.prototype.getAxis = function getAxis() {
ItemSet.prototype.reflow = function reflow () { ItemSet.prototype.reflow = function reflow () {
var changed = 0, var changed = 0,
options = this.options, options = this.options,
marginAxis = options.margin && options.margin.axis || this.defaultOptions.margin.axis,
marginItem = options.margin && options.margin.item || this.defaultOptions.margin.item,
marginAxis = (options.margin && 'axis' in options.margin) ? options.margin.axis : this.defaultOptions.margin.axis,
marginItem = (options.margin && 'item' in options.margin) ? options.margin.item : this.defaultOptions.margin.item,
update = util.updateProperty, update = util.updateProperty,
asNumber = util.option.asNumber, asNumber = util.option.asNumber,
asSize = util.option.asSize, asSize = util.option.asSize,

+ 2
- 1
src/timeline/component/css/item.css View File

@ -47,7 +47,8 @@
background: none; background: none;
} }
.vis.timeline .dot {
.vis.timeline .dot,
.vis.timeline .item.dot {
padding: 0; padding: 0;
border: 5px solid #97B0F8; border: 5px solid #97B0F8;
position: absolute; position: absolute;

Loading…
Cancel
Save