mirror of
https://github.com/WilliamsNY/contain-element.git
synced 2024-12-21 23:40:23 -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.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)) {
|
||||
switch(options.halign) {
|
||||
case 'left':
|
||||
|
@ -45,7 +45,7 @@ function ContainElement(options) {
|
|||
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) {
|
||||
switch(options.valign) {
|
||||
case 'top':
|
||||
|
|
Loading…
Reference in a new issue