Browse Source

Fixed #279: `className` of groups not being updated when changed

v3_develop
jos 10 years ago
parent
commit
23cb1da05f
7 changed files with 24972 additions and 24769 deletions
  1. +1
    -1
      HISTORY.md
  2. +24951
    -24751
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +1
    -1
      dist/vis.min.css
  5. +10
    -9
      dist/vis.min.js
  6. +5
    -4
      lib/timeline/component/Group.js
  7. +3
    -2
      test/timeline_groups.html

+ 1
- 1
HISTORY.md View File

@ -17,7 +17,7 @@ http://visjs.org
### Timeline
- Fixed moment.js url in localization example.
- Fixed `className` of groups not being updated when changed.
## 2014-08-29, version 3.3.0

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


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


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


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


+ 5
- 4
lib/timeline/component/Group.js View File

@ -99,15 +99,16 @@ Group.prototype.setData = function(data) {
var className = data && data.className || null;
if (className != this.className) {
if (this.className) {
util.removeClassName(this.dom.label, className);
util.removeClassName(this.dom.foreground, className);
util.removeClassName(this.dom.background, className);
util.removeClassName(this.dom.axis, className);
util.removeClassName(this.dom.label, this.className);
util.removeClassName(this.dom.foreground, this.className);
util.removeClassName(this.dom.background, this.className);
util.removeClassName(this.dom.axis, this.className);
}
util.addClassName(this.dom.label, className);
util.addClassName(this.dom.foreground, className);
util.addClassName(this.dom.background, className);
util.addClassName(this.dom.axis, className);
this.className = className;
}
};

+ 3
- 2
test/timeline_groups.html View File

@ -51,7 +51,7 @@
var names = ['John (0)', 'Alston (1)', 'Lee (2)', 'Grant (3)'];
var groups = new vis.DataSet();
for (var g = 0; g < groupCount; g++) {
groups.add({id: g, content: names[g], title: 'Title of group ' + g});
groups.add({id: g, content: names[g], title: 'Title of group ' + g, 'className': 'myGroup'});
}
// create a dataset with items
@ -66,7 +66,8 @@
' <span style="color:#97B0F8;">(' + names[group] + ')</span>',
start: start,
title: 'Title for item ' + i,
type: 'box'
type: 'box',
className: 'myItem'
});
}

Loading…
Cancel
Save