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.
angular-track-height
Advanced tools
Watch an element for the min or/and max height then save it for use somewhere else
Watch an element for the min or/and max height then save it for use somewhere else
Mostly to avoid flicker on ui-view/ng-view when it changes height.
$ bower install angular-track-height --save
$ npm install angular-track-height --save
Requires requestAnimationFrame
Tracks the height of an element for usage somewhere else, like inside a controller or inside other directives.
<div track-height="{{ ctrl.nameit }}" class="some-element" ui-view=""></div>
You can set the min and max, depending on the options you pass to it.
By passing "min", the min-height
will be set to the mininum value the element ever had (can be 0)
By passing "max", the min-height
will be set to the max value the element ever had
By passing "min max", the height
will be set to the max value the element ever had (might have problems with heavily responsive elements)
<div track-height="nameit" track-height-apply="min max" class="some-element" ui-view=""></div>
You can access your element height using this service, by the name you provide
.get
Gets the min or max height of an element
.set
Programatically sets the min or max height of an element
angular
.module('App', [
'TrackHeight'
])
.controller('yourcontroller', ['TrackHeight', function(TrackHeight){
var heights = TrackHeight.get('nameit');
// heights.min / heights.max / heights.current;
TrackHeight.set('nameit', {
min: 10,
max: 100,
current: 50
});
});
MIT
FAQs
Watch an element for the min or/and max height then save it for use somewhere else
The npm package angular-track-height receives a total of 1 weekly downloads. As such, angular-track-height popularity was classified as not popular.
We found that angular-track-height 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.