(Box root, Box test)
| 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 | { |
no test coverage detected