Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Proportionally scaling adjacent elements? Reply To: Proportionally scaling adjacent elements?

#245005
slmille4
Participant

Excellent, got it, thank you! One thing I’m confused about though, in the original with the Resizable component, the transform code was:

$el.css({
transform: “translate(-50%, -50%) ” + “scale(” + scale + “)”
});

while in order to get things to line up when it was just in a div, I needed:

$el.css({
transform: “translate(-50%, 0%) ” + “scale(” + scale + “)”
});

why was the change necessary?

source:
http://codepen.io/slmille4/pen/PzrQLv