mirror of
https://github.com/WilliamsNY/contain-element.git
synced 2024-11-21 22:02:31 -05:00
Swap middle with center in the comments
This commit is contained in:
parent
09752ed55a
commit
b4ca0e07f6
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ function ContainElement(options) {
|
||||||
element.style.width = (elementWidth * scaleFactor) + 'px';
|
element.style.width = (elementWidth * scaleFactor) + 'px';
|
||||||
element.style.height = (elementHeight * scaleFactor) + 'px';
|
element.style.height = (elementHeight * scaleFactor) + 'px';
|
||||||
|
|
||||||
// Anchor the element horizontally to the left/middle/right
|
// Anchor the element horizontally to the left/center/right
|
||||||
if (parentWidth < (elementWidth * scaleFactor)) {
|
if (parentWidth < (elementWidth * scaleFactor)) {
|
||||||
switch(options.halign) {
|
switch(options.halign) {
|
||||||
case 'left':
|
case 'left':
|
||||||
|
@ -45,7 +45,7 @@ function ContainElement(options) {
|
||||||
element.style.left = 0 + 'px';
|
element.style.left = 0 + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Anchor the element vertically to the top/middle/bottom
|
// Anchor the element vertically to the top/center/bottom
|
||||||
if ((elementHeight * scaleFactor) > parentHeight) {
|
if ((elementHeight * scaleFactor) > parentHeight) {
|
||||||
switch(options.valign) {
|
switch(options.valign) {
|
||||||
case 'top':
|
case 'top':
|
||||||
|
|
Loading…
Reference in a new issue