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

Method bottom

src/main/java/fieldbox/boxes/plugins/Alignment.java:208–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206 }
207
208 private void bottom() {
209 selected().map(a -> a.properties.get(Box.frame).y + a.properties.get(Box.frame).h)
210 .max(Float::compare)
211 .ifPresent(x -> {
212 selected().forEach(bx -> {
213 set(bx, z -> z.y = x.floatValue() - bx.properties.get(Box.frame).h);
214 bx.properties.get(Box.frame).y = x.floatValue() - bx.properties.get(Box.frame).h;
215 });
216 Drawing.dirty(this);
217 });
218 }
219
220 public Stream<Box> selected() {
221 return breadthFirst(both()).filter(x -> x.properties.isTrue(Mouse.isSelected, false));

Callers

nothing calls this directly

Calls 7

selectedMethod · 0.95
setMethod · 0.95
dirtyMethod · 0.95
getMethod · 0.65
maxMethod · 0.45
mapMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected