Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
get-visible-rect
Advanced tools
Note: tests are failing, because they only run in PhantomJS on travis for now - enabling real browsers soon.
When the element is inside the viewport, getVisibleRect()
returns:
{
visibleHeight,
visibleWidth,
height,
width,
// these positions are relative to the elements top/left
top,
bottom,
left,
right
}
When element is outside the viewport, visibleHeight
and visibleWidth
will be 0
,
while top
/bottom
/left
/right
will be undefined
.
My primary purpose for building this (and not using something else) is to calculate the visible percentage of the
element. visibleHeight
is actually bottom - top
and visibleWidth
is right - left
. This means that the visible
percentage is (visibleHeight * visibleWidth) / (height * width)
.
FAQs
Calculates the visible portion of the element inside the viewport
The npm package get-visible-rect receives a total of 73 weekly downloads. As such, get-visible-rect popularity was classified as not popular.
We found that get-visible-rect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.