mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Vis. Fix DataGroup mappings for nestedGroups, added visible and showNested to DataGroup as described in vis.js documentation (#35965)
* Add support of subgroupStack on DataGroup * Update index.d.ts * Update index.d.ts Added new SubGroupStackOptions dynamic structure and updated type of DataGroup.subgroupStack to SubGroupStackOptions | boolean * Update index.d.ts codestyling * Update index.d.ts codestyling colon * Fix DataGroup mappings for nestedGroups, added visible and showNested to DataGroup as described in vis.js documentation * DataGroup test * fix redundant line break
This commit is contained in:
Vendored
+3
-1
@@ -107,8 +107,10 @@ export interface DataGroup {
|
||||
style?: string;
|
||||
subgroupOrder?: string | (() => void);
|
||||
title?: string;
|
||||
nestedGroups?: number[];
|
||||
nestedGroups?: IdType[];
|
||||
subgroupStack?: SubGroupStackOptions | boolean;
|
||||
visible?: boolean;
|
||||
showNested?: boolean;
|
||||
}
|
||||
|
||||
export interface DataGroupOptions {
|
||||
|
||||
@@ -147,6 +147,16 @@ const positiveBalance = dataset.get({
|
||||
}
|
||||
});
|
||||
|
||||
// DataGroup test
|
||||
const groups = [
|
||||
{id: "1", content: "group 1", visible: true},
|
||||
{id: "2", content: "group 2", visible: false},
|
||||
{id: "3", content: "parent group", nestedGroups: [ "1", "2" ], visible: false, showNested: true}
|
||||
];
|
||||
|
||||
const timelineContainer = <HTMLElement> document.getElementById('timeline');
|
||||
const timeline = new vis.Timeline(timelineContainer, [], groups);
|
||||
|
||||
//
|
||||
// Test code sample from Getting Started http://visjs.org/docs/network/
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user