thenikso / angular-autolayout Goto Github PK
View Code? Open in Web Editor NEWConstraint based layout for your AngularJS apps
Home Page: http://thenikso.github.io/angular-autolayout
Constraint based layout for your AngularJS apps
Home Page: http://thenikso.github.io/angular-autolayout
In an example like the following, the div demo1
has no height unless explicitly set. This makes sense, as demo1-A through C are positioned absolutely, and therefor remove from the layout flow. However, it would be nice if constrained children would expand the bounds of their parents as well.
<div id="demo1" class="demo-container" al-update-on-resize>
<div id="demo2">
<div id="demo1-A" class="demo-box">A</div>
<div id="demo1-B" class="demo-box">B</div>
<div id="demo1-C" class="demo-box">C</div>
<al-constraint>|-[demo1-A]-|</al-constraint>
<al-constraint>|-[demo1-B]-|</al-constraint>
<al-constraint>|-[demo1-C]-|</al-constraint>
<al-constraint>V:|-[demo1-A]-[demo1-B(==demo1-A)]-[demo1-C(==demo1-A)]-|</al-constraint>
</div>
</div>
IE 9 & 10 aren't ecmascript 5 compliant browser, but thanks to shims can be. Specifically in this case of defineGetter/defineSetter functions which are used by the autolayout module, this can be overcome by executing:
try {
if (!Object.prototype.__defineGetter__ && Object.defineProperty({},"x",{get: function(){return true}}).x) {
Object.defineProperty(Object.prototype, "__defineGetter__", {
enumerable: false,
configurable: true,
value: function(name,func) {
Object.defineProperty(this,name, {get:func, enumerable: true, configurable: true});
}
});
Object.defineProperty(Object.prototype, "__defineSetter__", {
enumerable: false,
configurable: true,
value: function(name,func) {
Object.defineProperty(this,name, {set:func,enumerable: true,configurable: true});
}
});
}
} catch(defPropException) {/*Do nothing if an exception occurs*/};
in the global/root context.
It would be nice to have this documented in the readme.
I only say this as ie9/10 are still supported browsers in angular 1.x releases.
Hey there!
This project is always getting a new โญ from time to time an no one is complaining of anything about it!
I was wondering if you are using it and how. Also how would you see this going forward?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.