aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Angular.js7
-rw-r--r--src/jqLite.js2
-rw-r--r--src/scenario/bootstrap.js6
-rw-r--r--src/widgets.js4
4 files changed, 10 insertions, 9 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 94853004..005eeb19 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -94,8 +94,7 @@ function jqLiteWrap(element) {
var div = document.createElement('div');
div.innerHTML = element;
element = new JQLite(div.childNodes);
- } else if (element instanceof JQLite) {
- } else if (isElement(element)) {
+ } else if (!(element instanceof JQLite) && isElement(element)) {
element = new JQLite(element);
}
return element;
@@ -119,8 +118,8 @@ function isElement(node) {
function isVisible(element) {
var rect = element[0].getBoundingClientRect(),
- width = rect.width || (rect.right||0 - rect.left||0),
- height = rect.height || (rect.bottom||0 - rect.top||0);
+ width = (rect.width || (rect.right||0 - rect.left||0)),
+ height = (rect.height || (rect.bottom||0 - rect.top||0));
return width>0 && height>0;
}
diff --git a/src/jqLite.js b/src/jqLite.js
index 4dcd9349..53f52215 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -231,4 +231,4 @@ if (msie) {
this[0].fireEvent('on' + type);
}
});
-};
+}
diff --git a/src/scenario/bootstrap.js b/src/scenario/bootstrap.js
index b49530df..169f1860 100644
--- a/src/scenario/bootstrap.js
+++ b/src/scenario/bootstrap.js
@@ -12,10 +12,12 @@
})();
function addScript(path) {
document.write('<script type="text/javascript" src="' + prefix + path + '"></script>');
- };
+ }
+
function addCSS(path) {
document.write('<link rel="stylesheet" type="text/css" href="' + prefix + path + '"/>');
- };
+ }
+
window.onload = function(){
if (!_.stepper) {
_.stepper = function(collection, iterator, done){
diff --git a/src/widgets.js b/src/widgets.js
index 828e6d24..b296c354 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -214,8 +214,8 @@ angularWidget('NG:INCLUDE', function(element){
angularWidget('NG:SWITCH', function ngSwitch(element){
var compiler = this,
watchExpr = element.attr("on"),
- whenExpr = (element.attr("using") || 'equals').split(":");
- whenFn = ngSwitch[whenExpr.shift()];
+ whenExpr = (element.attr("using") || 'equals').split(":"),
+ whenFn = ngSwitch[whenExpr.shift()],
changeExpr = element.attr('change') || '',
cases = [];
if (!whenFn) throw "Using expression '" + usingExpr + "' unknown.";