MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / on

Method on

src/main/java/fieldbox/boxes/plugins/Planes.java:22–30  ·  view source on GitHub ↗
(Box root, Box test)

Source from the content-addressed store, hash-verified

20 static public field.utility.Dict.Prop<Function<Box, Number>> selectPlane = new Dict.Prop<>("selectPlane").type().toCanon().doc("set at the root level to determine which planes are visible and interactive at any one time");
21
22 static public double on(Box root, Box test) {
23 Function<Box, Number> selector = root.properties.getOr(selectPlane, () -> null);
24 if (selector == null) {
25 String p = test.properties.get(plane);
26 return (((p == null || p.trim().length() == 0) && test.properties.has(Box.frame) && test.properties.has(Box.name)) || (p!=null && p.trim().contains("__always__"))) ? 1 : 0;
27 } else {
28 return selector.apply(test).doubleValue();
29 }
30 }
31
32 static public Function<Box, Number> getSelector(Box root)
33 {

Callers 10

FrameManipulationMethod · 0.95
button2Method · 0.95
button0Method · 0.95
drawMethod · 0.95
startAtMethod · 0.95
populationMethod · 0.95
computeStrctureNowMethod · 0.95
checkForDeletionMethod · 0.95
DispatchMethod · 0.95
ChorderMethod · 0.95

Calls 6

getOrMethod · 0.80
getMethod · 0.65
applyMethod · 0.65
lengthMethod · 0.45
hasMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected