Browse Source

readded throttleRedraw (#2514)

* readded depricated option throttleRedraw; fixes #2511

* added doc style for depricated options
readme-improvements
Alexander Wunschik 7 years ago
committed by yotamberk
parent
commit
1eb05e52fa
6 changed files with 30 additions and 2 deletions
  1. +7
    -0
      docs/css/style.css
  2. +7
    -0
      docs/timeline/index.html
  3. +6
    -0
      lib/timeline/Graph2d.js
  4. +8
    -2
      lib/timeline/Timeline.js
  5. +1
    -0
      lib/timeline/optionsGraph2d.js
  6. +1
    -0
      lib/timeline/optionsTimeline.js

+ 7
- 0
docs/css/style.css View File

@ -128,6 +128,13 @@ tr.visible {
fadeIn 250ms ease-in; fadeIn 250ms ease-in;
} }
tr.depricated td {
color: #AAA;
text-decoration: line-through;
}
tr.depricated td:last-child {
text-decoration: none;
}
@-webkit-keyframes fadeIn { @-webkit-keyframes fadeIn {
0% { 0% {

+ 7
- 0
docs/timeline/index.html View File

@ -1048,6 +1048,13 @@ function (option, path) {
This would be used as an additional way to add content that is constant in size with the visible frame of the item and does not get visibly hidden with the item's internal container: <code>vis-item-overflow</code> which is <code>overflow:hidden</code>.</td> This would be used as an additional way to add content that is constant in size with the visible frame of the item and does not get visibly hidden with the item's internal container: <code>vis-item-overflow</code> which is <code>overflow:hidden</code>.</td>
</tr> </tr>
<tr class='depricated'>
<td>throttleRedraw</td>
<td>number</td>
<td><code>0</code></td>
<td>This option is <b>DEPRICATED</b> and no longer supported. It will be removed in the next MAJOR release.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','timeAxis', this);"> <tr class='toggle collapsible' onclick="toggleTable('optionTable','timeAxis', this);">
<td><span parent="timeAxis" class="right-caret"></span> timeAxis</td> <td><span parent="timeAxis" class="right-caret"></span> timeAxis</td>
<td>Object</td> <td>Object</td>

+ 6
- 0
lib/timeline/Graph2d.js View File

@ -34,6 +34,12 @@ function Graph2d (container, items, groups, options) {
groups = forthArgument; groups = forthArgument;
} }
// TODO: REMOVE THIS in the next MAJOR release
// see https://github.com/almende/vis/issues/2511
if (options && options.throttleRedraw) {
console.warn("Graph2d option \"throttleRedraw\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.");
}
var me = this; var me = this;
this.defaultOptions = { this.defaultOptions = {
start: null, start: null,

+ 8
- 2
lib/timeline/Timeline.js View File

@ -41,6 +41,12 @@ function Timeline (container, items, groups, options) {
groups = forthArgument; groups = forthArgument;
} }
// TODO: REMOVE THIS in the next MAJOR release
// see https://github.com/almende/vis/issues/2511
if (options && options.throttleRedraw) {
console.warn("Timeline option \"throttleRedraw\" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.");
}
var me = this; var me = this;
this.defaultOptions = { this.defaultOptions = {
start: null, start: null,
@ -69,9 +75,9 @@ function Timeline (container, items, groups, options) {
this.options.rtl = (directionFromDom && (directionFromDom.toLowerCase() == "rtl")); this.options.rtl = (directionFromDom && (directionFromDom.toLowerCase() == "rtl"));
} else { } else {
this.options.rtl = options.rtl; this.options.rtl = options.rtl;
}
}
this.options.rollingMode = options && options.rollingMode;
this.options.rollingMode = options && options.rollingMode;
// all components listed here will be repainted automatically // all components listed here will be repainted automatically
this.components = []; this.components = [];

+ 1
- 0
lib/timeline/optionsGraph2d.js View File

@ -100,6 +100,7 @@ let allOptions = {
}, },
autoResize: {bool}, autoResize: {bool},
throttleRedraw: {number}, // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511
clickToUse: {bool}, clickToUse: {bool},
end: {number, date, string, moment}, end: {number, date, string, moment},
format: { format: {

+ 1
- 0
lib/timeline/optionsTimeline.js View File

@ -30,6 +30,7 @@ let allOptions = {
verticalScroll: { 'boolean': bool, 'undefined': 'undefined'}, verticalScroll: { 'boolean': bool, 'undefined': 'undefined'},
horizontalScroll: { 'boolean': bool, 'undefined': 'undefined'}, horizontalScroll: { 'boolean': bool, 'undefined': 'undefined'},
autoResize: { 'boolean': bool}, autoResize: { 'boolean': bool},
throttleRedraw: {number}, // TODO: DEPRICATED see https://github.com/almende/vis/issues/2511
clickToUse: { 'boolean': bool}, clickToUse: { 'boolean': bool},
dataAttributes: {string, array}, dataAttributes: {string, array},
editable: { editable: {

Loading…
Cancel
Save