mirror of
https://github.com/WilliamsNY/contain-element.git
synced 2024-11-21 13:52:32 -05:00
Replace another instance of 'document' that should be 'parent element' in the comments
This commit is contained in:
parent
7378d74b65
commit
f3b5b6354b
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ function ContainElement(options) {
|
|||
var parentWidth = element.parentElement.offsetWidth;
|
||||
var parentHeight = element.parentElement.offsetHeight;
|
||||
|
||||
// Run the scale/position functionality if able to determine the document width and height
|
||||
// Run the scale/position functionality if able to determine the parent element's width and height
|
||||
if ((parentWidth) && (parentHeight)) {
|
||||
// Calculate the scale factor
|
||||
if (parentWidth > ((parentHeight / (elementHeight * scaleFactor)) * (elementWidth * scaleFactor)))
|
||||
|
|
Loading…
Reference in a new issue