mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 09:24:42 -04:00
minor changes of new layout shape
This commit is contained in:
parent
78726e8b7f
commit
5fe6af4655
@ -97,10 +97,10 @@ public class LayoutShape implements Shape {
|
|||||||
width = Math.max(Math.max(top.size(), bottom.size()) + 1, custom.getAttributes().get(Keys.WIDTH));
|
width = Math.max(Math.max(top.size(), bottom.size()) + 1, custom.getAttributes().get(Keys.WIDTH));
|
||||||
|
|
||||||
HashMap<String, PinPos> map = new HashMap<>();
|
HashMap<String, PinPos> map = new HashMap<>();
|
||||||
top.createPosition(map, new Vector(((width - top.size()) / 2 + 1) * SIZE, 0));
|
top.createPosition(map, new Vector(((width - top.size() - 1) / 2 + 1) * SIZE, 0));
|
||||||
bottom.createPosition(map, new Vector(((width - bottom.size()) / 2 + 1) * SIZE, SIZE * height));
|
bottom.createPosition(map, new Vector(((width - bottom.size() - 1) / 2 + 1) * SIZE, SIZE * height));
|
||||||
left.createPosition(map, new Vector(0, ((height - left.size()) / 2 + 1) * SIZE));
|
left.createPosition(map, new Vector(0, ((height - left.size() - 1) / 2 + 1) * SIZE));
|
||||||
right.createPosition(map, new Vector(SIZE * width, ((height - right.size()) / 2 + 1) * SIZE));
|
right.createPosition(map, new Vector(SIZE * width, ((height - right.size() - 1) / 2 + 1) * SIZE));
|
||||||
|
|
||||||
pins = new Pins();
|
pins = new Pins();
|
||||||
for (PinDescription p : custom.getInputDescription(elementAttributes))
|
for (PinDescription p : custom.getInputDescription(elementAttributes))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user