I have some display panels I need to show (web). I have to create an outline of shapes in these panels. The shapes can be any size, but I can use a factor to shrink them down appropriately to fit the panel.
My problem arises when some shapes are much bigger than others BUT because of the panel size constraint, they get shrunk down to match those sizes that much smaller. Is there an algorithm that can make the factor variable depending the largest and smallest shape sizes?
I'm using javascript. The shapes are square/rectangle - horizontal/vertical types.