Browse Source

Merge remote-tracking branch 'origin/v4' into v4

flowchartTest
Alex de Mulder 9 years ago
parent
commit
eded5ecbda
11 changed files with 20 additions and 65 deletions
  1. +0
    -12
      docs/timeline.html
  2. +2
    -3
      examples/graph2d/05_bothAxis.html
  3. +3
    -3
      examples/graph2d/16_bothAxis_titles.html
  4. +2
    -2
      examples/timeline/18_range_overflow.html
  5. +2
    -32
      lib/timeline/Core.js
  6. +1
    -1
      lib/timeline/component/Legend.js
  7. +1
    -1
      lib/timeline/component/css/item.css
  8. +6
    -8
      lib/timeline/component/css/pathStyles.css
  9. +1
    -1
      lib/timeline/component/item/BackgroundItem.js
  10. +1
    -1
      lib/timeline/component/item/RangeItem.js
  11. +1
    -1
      test/timeline.html

+ 0
- 12
docs/timeline.html View File

@ -872,18 +872,6 @@ var options = {
Returns ID of the newly created bar.
</td>
</tr>
<tr>
<td>clear([what])</td>
<td>none</td>
<td>
Clear the Timeline. An object can be passed specifying which sections to clear: items, groups,
and/or options. By Default, items, groups and options are cleared, i.e. <code>what = {items: true, groups: true, options: true}</code>. Example usage:
<pre class="prettyprint lang-js">timeline.clear(); // clear items, groups, and options
timeline.clear({options: true}); // clear options only
</pre>
</td>
</tr>
<tr>
<td>destroy()</td>

+ 2
- 3
examples/graph2d/05_bothAxis.html View File

@ -3,6 +3,8 @@
<head>
<title>Graph2d | Both Axis Example</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<script src="../../dist/vis.js"></script>
<style type="text/css">
body, html {
font-family: sans-serif;
@ -32,9 +34,6 @@
stroke: none;
}
</style>
<!--IMPORTANT: import the vis css after the custom styles to avoid overriding styles-->
<script src="../../dist/vis.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>

+ 3
- 3
examples/graph2d/16_bothAxis_titles.html View File

@ -3,6 +3,8 @@
<head>
<title>Graph2d | Axis Titles and Styling</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<script src="../../dist/vis.js"></script>
<style type="text/css">
body, html {
font-family: sans-serif;
@ -34,9 +36,7 @@
}
</style>
<script src="../../dist/vis.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Axis Titles and Styling</h2>
<div style="width:800px; font-size:14px; text-align: justify;">

+ 2
- 2
examples/timeline/18_range_overflow.html View File

@ -11,7 +11,7 @@
font-family: sans-serif;
}
.vis-item .vis-item-frame {
.vis-item .vis-item-overflow {
overflow: visible;
}
</style>
@ -22,7 +22,7 @@
In case of ranges being spread over a wide range of time, it can be interesting to have the text contents of the ranges overflow the box. This can be achieved by changing the overflow property of the contents to visible with css:
</p>
<pre>
.vis-item .vis-item-frame {
.vis-item .vis-item-overflow {
overflow: visible;
}
</pre>

+ 2
- 32
lib/timeline/Core.js View File

@ -288,7 +288,8 @@ Core.prototype.isActive = function () {
*/
Core.prototype.destroy = function () {
// unbind datasets
this.clear();
this.setItems(null);
this.setGroups(null);
// remove all event listeners
this.off();
@ -455,37 +456,6 @@ Core.prototype.getVisibleItems = function() {
return this.itemSet && this.itemSet.getVisibleItems() || [];
};
/**
* Clear the Core. By Default, items, groups and options are cleared.
* Example usage:
*
* timeline.clear(); // clear items, groups, and options
* timeline.clear({options: true}); // clear options only
*
* @param {Object} [what] Optionally specify what to clear. By default:
* {items: true, groups: true, options: true}
*/
Core.prototype.clear = function(what) {
// clear items
if (!what || what.items) {
this.setItems(null);
}
// clear groups
if (!what || what.groups) {
this.setGroups(null);
}
// clear options of timeline and of each of the components
if (!what || what.options) {
this.components.forEach(component => component.setOptions(component.defaultOptions));
this.setOptions(this.defaultOptions); // this will also do a redraw
}
};
/**
* Set Core window such that it fits all items
* @param {Object} [options] Available options:

+ 1
- 1
lib/timeline/component/Legend.js View File

@ -39,7 +39,7 @@ Legend.prototype = new Component();
Legend.prototype.clear = function() {
this.groups = {};
this.amountOfGroups = 0;
}
};
Legend.prototype.addGroup = function(label, graphOptions) {

+ 1
- 1
lib/timeline/component/css/item.css View File

@ -57,7 +57,7 @@
margin: 0;
}
.vis-item .vis-item-frame {
.vis-item .vis-item-overflow {
position: relative;
width: 100%;
height: 100%;

+ 6
- 8
lib/timeline/component/css/pathStyles.css View File

@ -68,24 +68,24 @@
stroke: #8f3938;
}
.vis-fill {
.vis-timeline .vis-fill {
fill-opacity:0.1;
stroke: none;
}
.vis-bar {
.vis-timeline .vis-bar {
fill-opacity:0.5;
stroke-width:1px;
}
.vis-point {
.vis-timeline .vis-point {
stroke-width:2px;
fill-opacity:1.0;
}
.vis-legend-background {
.vis-timeline .vis-legend-background {
stroke-width:1px;
fill-opacity:0.9;
fill: #ffffff;
@ -93,16 +93,14 @@
}
.vis-outline {
.vis-timeline .vis-outline {
stroke-width:1px;
fill-opacity:1;
fill: #ffffff;
stroke: #e5e5e5;
}
.vis-icon-fill {
.vis-timeline .vis-icon-fill {
fill-opacity:0.3;
stroke: none;
}

+ 1
- 1
lib/timeline/component/item/BackgroundItem.js View File

@ -66,7 +66,7 @@ BackgroundItem.prototype.redraw = function() {
// frame box (to prevent the item contents from overflowing
dom.frame = document.createElement('div');
dom.frame.className = 'vis-item-frame';
dom.frame.className = 'vis-item-overflow';
dom.box.appendChild(dom.frame);
// contents box

+ 1
- 1
lib/timeline/component/item/RangeItem.js View File

@ -62,7 +62,7 @@ RangeItem.prototype.redraw = function() {
// frame box (to prevent the item contents from overflowing
dom.frame = document.createElement('div');
dom.frame.className = 'vis-item-frame';
dom.frame.className = 'vis-item-overflow';
dom.box.appendChild(dom.frame);
// contents box

+ 1
- 1
test/timeline.html View File

@ -23,7 +23,7 @@
.vis-timeline .vis-item.vis-range .vis-drag-left,
.vis-timeline .vis-item.vis-range .vis-drag-right {
/*width: 40px;*/
background: rgba(255,255,255,0.5);
background: rgba(255,0,0,0.5);
}
#visualization .vis-grid.vis-vertical.odd {

Loading…
Cancel
Save