-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
docmaker.json
3825 lines (3488 loc) · 167 KB
/
docmaker.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"fnArgLinks": {
"selector": "#selectors",
"event": "#events",
"events": "#events",
"eleObj": "#notation/elements-json",
"eleObjs": "#notation/elements-json",
"elesArray": "#notation/elements-json",
"elesJson": "#notation/elements-json",
"eleJson": "#notation/elements-json",
"ele": "#collection",
"eles": "#collection",
"root": "#collection",
"roots": "#collection",
"position": "#notation/position",
"pos": "#notation/position",
"renderedPosition": "#notation/position",
"pan": "#notation/position",
"panBy": "#notation/position",
"css": "#style",
"style": "#style",
"stylesheet": "#style",
"easing": "#style/transition-animation",
"cyJson": "#core/initialisation"
},
"sections": [
{
"md": "links"
},
{
"name": "Demos",
"md": "demos",
"demos": [
{ "name": "Cola.js gene-gene graph", "id": "colajs-graph" },
{ "name": "Tokyo railways", "id": "tokyo-railways" },
{ "name": "Wine & cheese", "id": "wine-cheese-map", "github": "cytoscape/wineandcheesemap", "viewUrl": "http://wineandcheesemap.com" },
{ "name": "Performance tuning", "id": "performance-tuning" },
{ "name": "Popper.js extension", "id": "popper", "github": "cytoscape/cytoscape.js-popper" },
{ "name": "Popper.js extension & Tippy.js tooltips", "id": "popper-tippy", "github": "cytoscape/cytoscape.js-popper", "viewUrl": "https://cytoscape.github.io/cytoscape.js-popper/demo-tippy.html" },
{ "name": "Automove extension", "id": "automove", "github": "cytoscape/cytoscape.js-automove" },
{ "name": "Cxtmenu extension", "id": "cxtmenu", "github": "cytoscape/cytoscape.js-cxtmenu" },
{ "name": "Edgehandles extension", "id": "edgehandles", "github": "cytoscape/cytoscape.js-edgehandles" },
{ "name": "Circle layout", "id": "circle-layout" },
{ "name": "Concentric layout", "id": "concentric-layout" },
{ "name": "Grid layout", "id": "grid-layout" },
{ "name": "CoSE layout", "id": "cose-layout" },
{ "name": "CoSE Bilkent layout", "id": "cose-bilkent-layout", "github": "cytoscape/cytoscape.js-cose-bilkent" },
{ "name": "CoSE Bilkent layout (compound)", "id": "cose-bilkent-layout-compound", "github": "cytoscape/cytoscape.js-cose-bilkent", "viewUrl": "https://cytoscape.github.io/cytoscape.js-cose-bilkent/demo-compound.html" },
{ "name": "Cola layout", "id": "cola-layout", "github": "cytoscape/cytoscape.js-cola" },
{ "name": "Cola layout (compound)", "id": "cola-layout-compound", "github": "cytoscape/cytoscape.js-cola", "viewUrl": "https://cytoscape.github.io/cytoscape.js-cola/demo-compound.html" },
{ "name": "Euler layout", "id": "euler-layout", "github": "cytoscape/cytoscape.js-euler" },
{ "name": "Spread layout", "id": "spread-layout", "github": "cytoscape/cytoscape.js-spread" },
{ "name": "Dagre layout", "id": "dagre-layout", "github": "cytoscape/cytoscape.js-dagre" },
{ "name": "Klay layout", "id": "klay-layout", "github": "cytoscape/cytoscape.js-klay" },
{ "name": "Breadthfirst layout & images", "id": "images-breadthfirst-layout" },
{ "name": "Animated BFS", "id": "animated-bfs" },
{ "name": "Node types", "id": "node-types" },
{ "name": "Edge types", "id": "edge-types" },
{ "name": "Edge arrow types", "id": "edge-arrows" },
{ "name": "Labels", "id": "labels" },
{ "name": "Compound nodes", "id": "compound-nodes" },
{ "name": "Linkout example", "id": "linkout-example" },
{ "name": "Pie style", "id": "pie-style" }
],
"disabledDemos": [
{ "name": "Multiple instances", "id": "multiple-instances" },
{ "name": "Visual style", "id": "visual-style" },
{ "name": "Initialisation", "id": "initialisation" }
]
},
{ "name": "Introduction", "md": "intro" },
{ "name": "Notation", "md": "notation" },
{ "name": "Getting started", "md": "getting-started" },
{
"name": "Core",
"md": "core/core",
"sections": [
{ "name": "Initialisation", "md": "core/init" },
{
"name": "Graph manipulation",
"fns": [
{
"name": "cy.add",
"descr": "Add elements to the graph and return them.",
"formats": [
{ "descr": "Add a specified element to the graph.", "args": [ { "name": "eleObj", "descr": "A plain object that specifies the element." } ] },
{ "descr": "Add the specified elements to the graph.", "args": [ { "name": "eleObjs", "descr": "An array of elements specified by plain objects." } ] },
{ "descr": "Add the specified elements to the graph.", "args": [ { "name": "eles", "descr": "A collection of elements." } ] }
],
"md": "core/add"
},
{
"name": "cy.remove",
"descr": "Remove elements from the graph and return them.",
"formats": [
{ "descr": "Remove the specified elements.", "args": [ { "name": "eles", "descr": "A collection of elements to remove." } ] },
{ "descr": "Remove elements in the graph matching the specified selector.", "args": [ { "name": "selector", "descr": "Elements matching this selector are removed." } ] }
],
"md": "core/remove"
},
{
"name": "cy.collection",
"descr": "Return a new, empty collection.",
"formats": [
{
"descr": "Get an empty collection."
}
],
"md": "core/collection"
},
{
"name": "cy.getElementById",
"pureAliases": ["cy.$id"],
"descr": "Get an element from its ID in a very performant way.",
"formats": [
{ "args": [
{ "name": "id", "descr": "The ID of the element to get." }
] }
],
"md": "core/getElementById"
},
{
"name": "cy.$",
"descr": "Get elements in the graph matching a selector or a filter function.",
"formats": [
{
"name": "cy.$",
"descr": "Get elements in the graph matching the specified selector.",
"args": [ { "name": "selector", "descr": "The selector the elements should match." } ]
},
{
"name": "cy.elements",
"descr": "Get elements in the graph matching the specified selector.",
"args": [ { "name": "selector", "descr": "The selector the elements should match." } ]
},
{
"name": "cy.nodes",
"descr": "Get nodes in the graph matching the specified selector.",
"args": [ { "name": "selector", "descr": "The selector the nodes should match." } ]
},
{
"name": "cy.edges",
"descr": "Get edges in the graph matching the specified selector.",
"args": [ { "name": "selector", "descr": "The selector the edges should match." } ]
},
{
"name": "cy.filter",
"descr": "Get elements in the graph matching the specified selector.",
"args": [ { "name": "selector", "descr": "The selector the elements should match." } ]
},
{
"name": "cy.filter",
"descr": "Get elements in the graph matching the specified filter function.",
"args": [
{
"name": "function(ele, i, eles)",
"descr": "The filter function that returns true for elements that should be returned.",
"fields": [
{ "name": "ele", "descr": "The current element under consideration for filtering." },
{ "name": "i", "descr": "The counter used for iteration over the elements in the graph." },
{ "name": "eles", "descr": "The collection of elements being filtered" }
]
}
]
}
],
"md": "core/elements"
},
{
"name": "cy.batch",
"descr": "Allow for manipulation of elements without triggering multiple style calculations or multiple redraws.",
"formats": [
{
"args": [
{ "name": "function()", "descr": "A callback within which you can make batch updates to elements." }
]
},
{
"name": "cy.startBatch",
"descr": "Starts batching manually (useful for asynchronous cases)."
},
{
"name": "cy.endBatch",
"descr": "Ends batching manually (useful for asynchronous cases)."
}
],
"md": "core/batch"
},
{
"name": "cy.mount",
"descr": "Attaches the instance to the specified container for visualisation.",
"formats": [
{
"args": [
{ "name": "container", "descr": "A HTML DOM element in which the graph should be rendered." }
]
}
],
"md": "core/mount"
},
{
"name": "cy.unmount",
"descr": "Remove the instance from its current container.",
"md": "core/unmount"
},
{
"name": "cy.destroy",
"descr": "A convenience function to explicitly destroy the instance.",
"md": "core/destroy"
},
{
"name": "cy.scratch",
"extFn": true,
"descr": "Set or get scratchpad data, where temporary or non-JSON data can be stored. App-level scratchpad data should use namespaces prefixed with underscore, like `'_foo'`. This is analogous to the more common [`ele.scratch()`](#ele.scratch) but for graph global data.",
"formats": [
{
"descr": "Get the entire scratchpad object for the core."
},
{
"descr": "Get the scratchpad at a particular namespace.",
"args": [
{ "name": "namespace", "descr": "A namespace string." }
]
},
{
"descr": "Set the scratchpad at a particular namespace.",
"args": [
{ "name": "namespace", "descr": "A namespace string." },
{ "name": "value", "descr": "The value to set at the specified namespace." }
]
}
]
},
{
"name": "cy.removeScratch",
"extFn": true,
"descr": "Remove scratchpad data. You should remove scratchpad data only at your own namespaces. This is analogous to the more common [`ele.removeScratch()`](#ele.removeScratch) but for graph global data.",
"formats": [
{
"descr": "Remove the scratchpad data at a particular namespace.",
"args": [
{ "name": "namespace", "descr": "A namespace string." }
]
}
],
"md": "collection/removeScratch"
}
]
},
{
"name": "Events",
"fns": [
{
"name": "cy.on",
"pureAliases": ["cy.bind", "cy.listen", "cy.addListener"],
"descr": "Listen to events that occur in the graph.",
"formats": [
{
"args": [
{ "name": "events", "descr": "A space separated list of event names." },
{ "name": "selector", "descr": "A selector to specify elements for which the handler runs.", "optional": true },
{ "name": "function(event)", "descr": "The handler function that is called when one of the specified events occurs.", "fields": [ { "name": "event", "descr": "The event object." } ] }
]
}
],
"md": "core/on"
},
{
"name": "cy.promiseOn",
"pureAliases": ["cy.pon"],
"descr": "Get a promise that is resolved when the core emits the first of any of the specified events.",
"formats": [
{
"args": [
{ "name": "events", "descr": "A space separated list of event names." },
{ "name": "selector", "descr": "A selector to specify elements for which the handler runs.", "optional": true }
]
}
],
"md": "core/promiseOn"
},
{
"name": "cy.one",
"descr": "Listen to events that occur in the graph, and run the handler only once.",
"formats": [
{
"args": [
{ "name": "events", "descr": "A space separated list of event names." },
{ "name": "selector", "descr": "A selector to specify elements for which the handler runs.", "optional": true },
{ "name": "function(event)", "descr": "The handler function that is called when one of the specified events occurs.", "fields": [ { "name": "event", "descr": "The event object." } ] }
]
}
],
"md": "core/one"
},
{
"name": "cy.removeListener",
"pureAliases": ["cy.off", "cy.unbind", "cy.unlisten"],
"descr": "Remove event handlers.",
"formats": [
{
"args": [
{ "name": "events", "descr": "A space separated list of event names." },
{ "name": "selector", "descr": "The same selector used to listen to the events.", "optional": true },
{ "name": "handler", "descr": "A reference to the handler function to remove.", "optional": true }
]
}
],
"md": "core/removeListener"
},
{
"name": "cy.emit",
"pureAliases": ["cy.trigger"],
"descr": "Emit one or more events.",
"formats": [
{
"args": [
{ "name": "events", "descr": "A space separated list of event names to emit." },
{ "name": "extraParams", "descr": "An array of additional parameters to pass to the handler.", "optional": true }
]
}
],
"md": "core/emit"
},
{
"name": "cy.ready",
"descr": "Run a callback as soon as the graph becomes ready (i.e. intitial data loaded and initial layout completed). If the graph is already ready, then the callback is called immediately. If data is loaded synchronously and the layout used is discrete/synchronous/unanimated/unspecified, then you don't need `cy.ready()`.",
"formats": [
{
"args": [
{
"name": "function(event)",
"descr": "The callback run as soon as the graph is ready.",
"fields": [
{ "name": "event", "descr": "The `ready` event." }
]
}
]
}
]
}
]
},
{
"name": "Viewport manipulation",
"fns": [
{
"name": "cy.container",
"descr": "Get the HTML DOM element in which the graph is visualised. A null value is returned if the instance is headless."
},
{
"name": "cy.center",
"pureAliases": ["cy.centre"],
"descr": "Pan the graph to the centre of a collection.",
"formats": [
{ "descr": "Centre on all elements in the graph." },
{ "descr": "Centre on the specified elements.", "args": [ { "name": "eles", "descr": "The collection to centre upon." } ] }
],
"md": "core/center"
},
{
"name": "cy.fit",
"descr": "Pan and zooms the graph to fit to a collection.",
"formats": [
{ "descr": "Fit to all elements in the graph." },
{
"descr": "Fit to the specified elements.",
"args": [ { "name": "eles", "descr": "The collection to fit to.", "optional": true }, { "name": "padding", "descr": "An amount of padding (in rendered pixels) to have around the graph (default `0`).", "optional": true } ]
}
],
"md": "core/fit"
},
{
"name": "cy.reset",
"descr": "Reset the graph to the default zoom level and panning position.",
"formats": [
{ "descr": "Resets the zoom and pan." }
],
"md": "core/reset"
},
{
"name": "cy.pan",
"descr": "Get or set the panning position of the graph.",
"formats": [
{ "descr": "Get the current panning position." },
{ "descr": "Set the current panning position.", "args": [ { "name": "renderedPosition", "descr": "The rendered position to pan the graph to." } ] }
],
"md": "core/pan"
},
{
"name": "cy.panBy",
"descr": "Relatively pan the graph by a specified rendered position vector.",
"formats": [
{ "args": [ { "name": "renderedPosition", "descr": "The rendered position vector to pan the graph by." } ] }
],
"md": "core/panBy"
},
{
"name": "cy.panningEnabled",
"descr": "Get or set whether panning is enabled.",
"formats": [
{
"descr": "Get whether panning is enabled."
},
{
"descr": "Set whether panning is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables panning; a falsey value disables it." }
]
}
],
"md": "core/panningEnabled"
},
{
"name": "cy.userPanningEnabled",
"descr": "Get or set whether panning by user events (e.g. dragging the graph background) is enabled.",
"formats": [
{
"descr": "Get whether user panning is enabled."
},
{
"descr": "Set whether user panning is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables user panning; a falsey value disables it." }
]
}
],
"md": "core/userPanningEnabled"
},
{
"name": "cy.zoom",
"descr": "Get or set the zoom level of the graph.",
"formats": [
{ "descr": "Get the zoom level." },
{ "descr": "Set the zoom level.", "args": [ { "name": "level", "descr": "The zoom level to set." } ] },
{
"descr": "Set the zoom level.",
"args": [
{
"name": "options",
"descr": "The options for zooming.",
"fields": [
{ "name": "level", "descr": "The zoom level to set." },
{ "name": "position", "descr": "The position about which to zoom." },
{ "name": "renderedPosition", "descr": "The rendered position about which to zoom." }
]
}
]
}
],
"md": "core/zoom"
},
{
"name": "cy.zoomingEnabled",
"descr": "Get or set whether zooming is enabled.",
"formats": [
{
"descr": "Get whether zooming is enabled."
},
{
"descr": "Set whether zooming is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables zooming; a falsey value disables it." }
]
}
],
"md": "core/zoomingEnabled"
},
{
"name": "cy.userZoomingEnabled",
"descr": "Get or set whether zooming by user events (e.g. mouse wheel, pinch-to-zoom) is enabled.",
"formats": [
{
"descr": "Get whether user zooming is enabled."
},
{
"descr": "Set whether user zooming is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables user zooming; a falsey value disables it." }
]
}
],
"md": "core/userZoomingEnabled"
},
{
"name": "cy.minZoom",
"descr": "Get or set the minimum zoom level.",
"formats": [
{
"descr": "Get the minimum zoom level."
},
{
"descr": "Set the minimum zoom level.",
"args": [
{ "name": "zoom", "descr": "The new minimum zoom level to use." }
]
}
]
},
{
"name": "cy.maxZoom",
"descr": "Get or set the maximum zoom level.",
"formats": [
{
"descr": "Get the maximum zoom level."
},
{
"descr": "Set the maximum zoom level.",
"args": [
{ "name": "zoom", "descr": "The new maximum zoom level to use." }
]
}
]
},
{
"name": "cy.viewport",
"descr": "Set the viewport state (pan & zoom) in one call.",
"formats": [
{
"args": [
{ "name": "zoom", "descr": "The zoom level to set." },
{ "name": "pan", "descr": "The pan to set (a rendered position)." }
]
}
],
"md": "core/viewport"
},
{
"name": "cy.boxSelectionEnabled",
"descr": "Get or set whether box selection is enabled. If enabled along with panning, the user must hold one of shift, control, meta, or alt down to initiate box selection.",
"formats": [
{
"descr": "Get whether box selection is enabled."
},
{
"descr": "Set whether box selection is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables box selection; a falsey value disables it." }
]
}
],
"md": "core/boxSelectionEnabled"
},
{
"name": "cy.selectionType",
"descr": "Get or set the selection type. The `'single'` selection type is the default, tapping an element selects that element and deselects the previous elements. The `'additive' selection type toggles the selection state of an element when tapped.`",
"formats": [
{
"descr": "Get the selection type string."
},
{
"descr": "Set the selection type.",
"args": [
{ "name": "type", "descr": "The selection type string; one of `'single'` (default) or `'additive'`." }
]
}
]
},
{
"name": "cy.width",
"descr": "Get the on-screen width of the viewport in pixels."
},
{
"name": "cy.height",
"descr": "Get the on-screen height of the viewport in pixels."
},
{
"name": "cy.extent",
"descr": "Get the extent of the viewport, a bounding box in model co-ordinates that lets you know what model positions are visible in the viewport.",
"md": "core/extent"
},
{
"name": "cy.autolock",
"descr": "Get or set whether nodes are automatically locked (i.e. if `true`, nodes are locked despite their individual state).",
"formats": [
{
"descr": "Get whether autolocking is enabled."
},
{
"descr": "Set whether autolocking is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables autolocking; a falsey value disables it." }
]
}
],
"md": "core/autolock"
},
{
"name": "cy.autoungrabify",
"descr": "Get or set whether nodes are automatically ungrabified (i.e. if `true`, nodes are ungrabbale despite their individual state).",
"formats": [
{
"descr": "Get whether autoungrabifying is enabled."
},
{
"descr": "Set whether autoungrabifying is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables autoungrabbifying; a falsey value disables it." }
]
}
],
"md": "core/autoungrabify"
},
{
"name": "cy.autounselectify",
"descr": "Get or set whether nodes are automatically unselectified (i.e. if `true`, nodes are unselectable despite their individual state).",
"formats": [
{
"descr": "Get whether autounselectifying is enabled."
},
{
"descr": "Set whether autounselectifying is enabled.",
"args": [
{ "name": "bool", "descr": "A truthy value enables autounselectifying; a falsey value disables it." }
]
}
],
"md": "core/autounselectify"
},
{
"name": "cy.resize",
"pureAliases": ["cy.invalidateDimensions"],
"descr": "Force the renderer to recalculate the viewport bounds.",
"md": "core/resize"
}
]
},
{
"name": "Animation",
"fns": [
{
"name": "cy.animated",
"descr": "Get whether the viewport is currently being animated."
},
{
"name": "cy.animate",
"descr": "Animate the viewport.",
"formats": [
{
"args": [
{
"name": "options",
"descr": "An object containing the details of the animation.",
"fields": [
{
"name": "zoom",
"descr": "A zoom level (number) or a zoom configuration object to which the graph will be animated.",
"fields": [
{ "name": "level", "descr": "The zoom level to use." },
{ "name": "position", "descr": "The position about which zooming occurs. This automatically modifies the pan such that the specified model position remains at the same position in the viewport extent during zooming." },
{ "name": "renderedPosition", "descr": "The rendered position about which zooming occurs, as an alternative to using the model position. This automatically modifies the pan such that the model position, corresponding to the rendered position at the start of the animation, remains at the same position in the viewport extent during zooming." }
]
},
{ "name": "pan", "descr": "A panning position to which the graph will be animated." },
{ "name": "panBy", "descr": "A relative panning position to which the graph will be animated." },
{
"name": "fit",
"descr": "An object containing fitting options from which the graph will be animated.",
"fields": [
{ "name": "eles", "descr": "Elements or a selector to which the viewport will be fitted." },
{ "name": "padding", "descr": "Padding to use with the fitting (default `0`)." }
]
},
{
"name": "center",
"descr": "An object containing centring options from which the graph will be animated.",
"fields": [
{ "name": "eles", "descr": "Elements or a selector to which the viewport will be centred." }
]
},
{ "name": "duration", "descr": "The duration of the animation in milliseconds." },
{ "name": "queue", "descr": "A boolean indicating whether to queue the animation (default `true`). Queued animations on the core run in order until the queue is empty." },
{ "name": "complete", "descr": "A function to call when the animation is done." },
{ "name": "step", "descr": "A function to call each time the animation steps." },
{ "name": "easing", "descr": "A [`transition-timing-function`](#style/transition-animation) easing style string that shapes the animation progress curve." }
]
}
]
}
],
"md": "core/animate"
},
{
"name": "cy.animation",
"descr": "Get an [animation](#animations) of the viewport.",
"formats": [
{
"args": [
{
"name": "options",
"descr": "An object containing the details of the animation.",
"fields": [
{
"name": "zoom",
"descr": "A zoom level (number) or a zoom configuration object to which the graph will be animated.",
"fields": [
{ "name": "level", "descr": "The zoom level to use." },
{ "name": "position", "descr": "The position about which zooming occurs. This automatically modifies the pan such that the specified model position remains at the same position in the viewport extent during zooming." },
{ "name": "renderedPosition", "descr": "The rendered position about which zooming occurs, as an alternative to using the model position. This automatically modifies the pan such that the model position, corresponding to the rendered position at the start of the animation, remains at the same position in the viewport extent during zooming." }
]
},
{ "name": "pan", "descr": "A panning position to which the graph will be animated." },
{ "name": "panBy", "descr": "A relative panning position to which the graph will be animated." },
{
"name": "fit",
"descr": "An object containing fitting options from which the graph will be animated.",
"fields": [
{ "name": "eles", "descr": "Elements or a selector to which the viewport will be fitted." },
{ "name": "padding", "descr": "Padding to use with the fitting (default `0`)." }
]
},
{
"name": "center",
"descr": "An object containing centring options from which the graph will be animated.",
"fields": [
{ "name": "eles", "descr": "Elements or a selector to which the viewport will be centred." }
]
},
{ "name": "duration", "descr": "The duration of the animation in milliseconds." },
{ "name": "easing", "descr": "A [`transition-timing-function`](#style/transition-animation) easing style string that shapes the animation progress curve." }
]
}
]
}
]
},
{
"name": "cy.delay",
"descr": "Add a delay between queued animations for the viewport.",
"formats": [
{
"args": [
{ "name": "duration", "descr": "How long the delay should be in milliseconds." },
{ "name": "complete", "descr": "A function to call when the delay is complete." }
]
}
],
"md": "core/delay"
},
{
"name": "cy.delayAnimation",
"descr": "Get a delay [animation](#animations) of the viewport.",
"formats": [
{
"args": [
{ "name": "duration", "descr": "How long the delay should be in milliseconds." }
]
}
]
},
{
"name": "cy.stop",
"descr": "Stop all viewport animations that are currently running.",
"formats": [
{
"args": [
{ "name": "clearQueue", "descr": "A boolean (default `false`), indicating whether the queue of animations should be emptied." },
{ "name": "jumpToEnd", "descr": "A boolean (default `false`), indicating whether the currently-running animations should jump to their ends rather than just stopping midway." }
]
}
],
"md": "core/stop"
},
{
"name": "cy.clearQueue",
"descr": "Remove all queued animations for the viewport."
}
]
},
{
"name": "Layout",
"fns": [
{
"name": "cy.layout",
"pureAliases": ["cy.createLayout", "cy.makeLayout"],
"descr": "Get a new layout, which can be used to algorithmically position the nodes in the graph.",
"formats": [
{
"args": [
{
"name": "options",
"descr": "The layout options."
}
]
}
],
"md": "core/layout"
}
]
},
{
"name": "Style",
"fns": [
{
"name": "cy.style",
"descr": "Get the entry point to modify the visual style of the graph after initialisation.",
"formats": [
{
"descr": "Get the current style object."
},
{
"descr": "Assign a new stylesheet to replace the existing one.",
"args": [
{
"name": "stylesheet",
"descr": "Either a `cytoscape.stylesheet()` object, a string stylesheet, or a JSON stylesheet (the same formats accepted for [`options.style`](#style) at initialisation)."
}
]
}
],
"md": "core/style"
}
]
},
{
"name": "Export",
"fns": [
{
"name": "cy.png",
"descr": "Export the current graph view as a PNG image.",
"formats": [
{
"args": [
{
"name": "options",
"descr": "The export options.",
"fields": [
{ "name": "output", "descr": "Whether the output should be `'base64uri'` (default), `'base64'`, or `'blob'`." },
{ "name": "bg", "descr": "The background colour of the image (transparent by default)." },
{ "name": "full", "descr": "Whether to export the current viewport view (`false`, default) or the entire graph (`true`)." },
{ "name": "scale", "descr": "This value specifies a positive number that scales the size of the resultant image." },
{ "name": "maxWidth", "descr": "Specifies the scale automatically in combination with `maxHeight` such that the resultant image is no wider than `maxWidth`." },
{ "name": "maxHeight", "descr": "Specifies the scale automatically in combination with `maxWidth` such that the resultant image is no taller than `maxHeight`." }
]
}
]
}
],
"md": "core/png"
},
{
"name": "cy.jpg",
"pureAliases": ["cy.jpeg"],
"descr": "Export the current graph view as a JPG image.",
"formats": [
{
"args": [
{
"name": "options",
"descr": "The export options.",
"fields": [
{ "name": "output", "descr": "Whether the output should be `'base64uri'` (default), `'base64'`, or `'blob'`." },
{ "name": "bg", "descr": "The background colour of the image (white by default)." },
{ "name": "full", "descr": "Whether to export the current viewport view (`false`, default) or the entire graph (`true`)." },
{ "name": "scale", "descr": "This value specifies a positive number that scales the size of the resultant image." },
{ "name": "maxWidth", "descr": "Specifies the scale automatically in combination with `maxHeight` such that the resultant image is no wider than `maxWidth`." },
{ "name": "maxHeight", "descr": "Specifies the scale automatically in combination with `maxWidth` such that the resultant image is no taller than `maxHeight`." },
{ "name": "quality", "descr": "Specifies the quality of the image from `0` (low quality, low filesize) to `1` (high quality, high filesize). If not set, the browser's default quality value is used." }
]
}
]
}
],
"md": "core/jpg"
},
{
"name": "cy.json",
"descr": "Import or export the graph in the same JSON format used at initialisation.",
"formats": [
{
"descr": "Export the graph as JSON.",
"args": [
{ "name": "flatEles", "descr": "Whether the resulant JSON should include the elements as a flat array (`true`) or as two keyed arrays by group (`false`, default)." }
]
},
{
"descr": "Import the graph as JSON, updating only the fields specified.",
"args": [
{ "name": "cyJson", "descr": "The object with the fields corresponding to the states that should be changed." }
]
}
],
"md": "core/json"
}
]
}
]
},
{
"name": "Collection",
"md": "collection/collection",
"sections": [
{
"name": "Graph manipulation",
"fns": [
{
"name": "ele.cy",
"descr": "Get the core instance that owns the element."
},
{
"name": "eles.remove",
"descr": "Remove the elements from the graph, and return all elements removed by this call.",
"md": "collection/remove"
},
{
"name": "ele.removed",
"descr": "Get whether the element has been removed from the graph."
},