org-eclipse-elk-alg-radial 0.12.0
“ELK Radial layout algorithm of the Eclipse Layout Kernel, ported to pure Rust”
Basename is uppercase README.mdContains an unbounded block loop
SHA-2569ed70e16f5170921f3b89d98d7f978ede6953669f981c0c4cd853bd87e774178
URLhttps://static.crates.io/crates/org-eclipse-elk-alg-radial/org-eclipse-elk-alg-radial-0.12.0.crate
MaleculeMd(Pa₃)
Evidence
1use org_eclipse_elk_alg_radial::org::eclipse::elk::alg::radial::options::{
2 AnnulusWedgeCriteria, RadialMetaDataProvider, RadialOptions,
3};
4use org_eclipse_elk_core::org::eclipse::elk::core::data::{
5 LayoutMetaDataService, LayoutOptionTarget, LayoutOptionVisibility,
6};
7
8fn init_radial_options() {
9 let service = LayoutMetaDataService::get_instance();
10 service.register_layout_meta_data_provider(&RadialMetaDataProvider);
11}
12
13#[test]
14fn radial_algorithm_registered() {
15 init_radial_options();
16
17 let algo = LayoutMetaDataService::get_instance()
18 .get_algorithm_data(RadialOptions::ALGORITHM_ID)
19 .expect("radial algorithm");
20 assert_eq!(algo.name(), "ELK Radial");
21}
22
⋯5 lines
28 .get_option_data(RadialOptions::WEDGE_CRITERIA.id())
29 .expect("wedge criteria option");
30 assert!(option.targets().contains(&LayoutOptionTarget::Parents));
31 assert_eq!(option.visibility(), LayoutOptionVisibility::Visible);
32
⋯16 lines
1:32… :org::eclipse::elk::alg::radial::options::{
2 RadialMetaDataProvider, RadialOptions,
3};
4use org_eclipse_elk_alg_radial::org::eclipse::elk::alg::radial::RadialLayoutProvider;
5use org_eclipse_elk_core::org::eclipse::elk::core::data::LayoutMetaDataService;
6use org_eclipse_elk_core::org::eclipse::elk::core::options::core_options::CoreOptions;
7use org_eclipse_elk_core::org::eclipse::elk::core::util::BasicProgressMonitor;
8use org_eclipse_elk_core::org::eclipse::elk::core::IGraphLayoutEngine;
9use org_eclipse_elk_graph::org::eclipse::elk::graph::properties::Property;
10use org_eclipse_elk_graph::org::eclipse::elk::graph::util::ElkGraphUtil;
11use org_eclipse_elk_graph::org::eclipse::elk::graph::{ElkConnectableShapeRef, ElkNodeRef};
12
13fn init_radial_options() {
14 let service = LayoutMetaDataService::get_instance();
15 service.register_layout_meta_data_provider(&RadialMetaDataProvider);
16}
17
18#[test]
19fn test_simple_centering() {
20 init_radial_options();
21 let parent = ElkGraphUtil::create_graph();
22 let root = ElkGraphU …
56:20… ot_y, root_w, root_h) = node_bounds(&root);
57
58 assert!((parent_w / 2.0 - (root_x + margins.left + root_w / 2.0)).abs() < 0.1);
59 assert!((parent_h / …
97:32… :Node(n13.clone()),
98 );
99
100 for node in [&root, &n1, &n2, &n3, &n11, &n12, &n13] {
101 set_ …
292:66… he Eclipse
293Public License v. 2.0 are satisfied: GPL-3.0 which is available at
294https://www.gnu.org/licenses/gpl-3.0-standalone.html.
295
296SPDX-License-Identifier: EPL-2.0 OR GPL-3.0-or-later
297
298Source Code
⋯4 lines
No evidence locations were recorded for this file. Raw result