Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:enyojs/enyo

  • Loading branch information...
commit e2535e68025073b848eae34864a0e6ee244274a4 2 parents 2872780 + 7ccf2f1
Scott Miles authored
2  enyo.js
View
@@ -11,7 +11,7 @@
src = s.getAttribute("src") || "";
if (src.slice(-l) == inName) {
s.located = true;
- return {path: src.slice(0, src.lastIndexOf("/")), node: s};
+ return {path: src.slice(0, Math.max(0, src.lastIndexOf("/"))), node: s};
}
}
}
2  source/boot/enyo.js
View
@@ -11,7 +11,7 @@
src = s.getAttribute("src") || "";
if (src.slice(-l) == inName) {
s.located = true;
- return {path: src.slice(0, src.lastIndexOf("/")), node: s};
+ return {path: src.slice(0, Math.max(0, src.lastIndexOf("/"))), node: s};
}
}
}
6 source/boot/loader.js
View
@@ -165,7 +165,7 @@
this.loadScript(inPath);
},
decodePackagePath: function(inPath) {
- // A package path can encoded in two ways:
+ // A package path can be encoded in two ways:
//
// 1. [folder]
// 2. [folder]/[*package.js]
@@ -176,9 +176,9 @@
// convert back slashes to forward slashes, remove double slashes, split on slash
var parts = inPath.replace(/\\/g, "/").replace(/\/\//g, "/").replace(/:\//, "://").split("/");
if (parts.length) {
- // in inPath has a trailing slash, parts has an empty string which we pop off and ignore
+ // if inPath has a trailing slash, parts has an empty string which we pop off and ignore
var name = parts.pop() || parts.pop() || "";
- // test is name includes the manifest tag
+ // test if name includes the manifest tag
if (name.slice(-manifest.length) !== manifest) {
// if not a manifest name, it's part of the folder path
parts.push(name);
4 source/dom/Control.js
View
@@ -267,7 +267,7 @@ enyo.kind({
// applied by layouts or other objects.
// We may need a 'runtimeStyles' concept separate from a 'userStyles' concept, although
// it's not clear what API calls like 'applyStyle' would affect, and which concept would take
- // precendence when there is a conflict.
+ // precedence when there is a conflict.
// Perhaps we can separate 'style' completely from 'domStyles'. API methods like applyStyle
// would affect domStyles, and the two style databases would be combined at render-time.
// Alternatively, we can disallow changing "style" string at runtime and allow it to be set
@@ -723,7 +723,7 @@ enyo.Control.subclass = function(ctor, props) {
//
// However, the properties are no longer 'live' in prototypes
// because of this magic. I.e. changes to the prototype of
- // a Control subclass will not necesssarily be reflected in
+ // a Control subclass will not necessarily be reflected in
// instances of that Control (e.g. chained prototypes).
//
// These properties are also renamed to kind* to allow
2  source/dom/dispatcher.js
View
@@ -4,7 +4,7 @@ enyo.$ = {};
enyo.dispatcher = {
// these events come from document
events: ["mousedown", "mouseup", "mouseover", "mouseout", "mousemove", "mousewheel", "click", "dblclick", "change", "keydown", "keyup", "keypress", "input"],
- // thes events come from window
+ // these events come from window
windowEvents: ["resize", "load", "unload", "message"],
// feature plugins (aka filters)
features: [],
7 source/dom/dom.css
View
@@ -1,11 +1,14 @@
+/* things we always want */
+body {
+ -webkit-overflow-scrolling: touch;
+}
+
/* for apps */
.enyo-document-fit {
margin: 0;
height: 100%;
- /*overflow: auto;*/
overflow: hidden;
position: relative;
- -webkit-overflow-scrolling: touch;
}
/* reset */
3  source/dom/drag.js
View
@@ -20,7 +20,7 @@
//* @protected
enyo.dispatcher.features.push(
function(e) {
- // NOTE: beware of properties in enyo.gesture inadvertantly mapped to event types
+ // NOTE: beware of properties in enyo.gesture inadvertently mapped to event types
if (enyo.gesture.drag[e.type]) {
return enyo.gesture.drag[e.type](e);
}
@@ -61,6 +61,7 @@ enyo.gesture.drag = {
this.sendDrag(e);
} else if (this.dy*this.dy + this.dx*this.dx >= this.hysteresisSquared) {
this.sendDragStart(e);
+ e.requireTouchmove = this.dragEvent.requireTouchmove;
this.cancelHold();
}
}
2  source/dom/gesture.js
View
@@ -116,7 +116,7 @@ enyo.gesture.preventNativeDefault = function() {
enyo.dispatcher.features.push(
function(e) {
- // NOTE: beware of properties in enyo.gesture inadvertantly mapped to event types
+ // NOTE: beware of properties in enyo.gesture inadvertently mapped to event types
if (enyo.gesture.events[e.type]) {
return enyo.gesture.events[e.type](e);
}
12 source/dom/platform.js
View
@@ -28,6 +28,9 @@ enyo.platform = {};
var platforms = [
// Android 2 - 4
{platform: "android", regex: /Android (\d+)/},
+ // Kindle Fire
+ // Force version to 2, (desktop mode does not list android version)
+ {platform: "android", regex: /Silk\//, forceVersion: 2},
// IE 8 - 10
{platform: "ie", regex: /MSIE (\d+)/},
// iOS 3 - 5
@@ -36,10 +39,15 @@ enyo.platform = {};
// webOS 1 - 3
{platform: "webos", regex: /(?:web|hpw)OS\/(\d+)/}
];
- for (var i = 0, p, m; p = platforms[i]; i++) {
+ for (var i = 0, p, m, v; p = platforms[i]; i++) {
m = p.regex.exec(ua);
if (m) {
- ep[p.platform] = Number(m[1]);
+ if (p.forceVersion) {
+ v = p.forceVersion;
+ } else {
+ v = Number(m[1]);
+ }
+ ep[p.platform] = v;
break;
}
}
4 source/kernel/UiComponent.js
View
@@ -189,6 +189,7 @@ enyo.kind({
// syntactic sugar for 'waterfall("onresize")'
resized: function() {
this.waterfall("onresize");
+ this.waterfall("onpostresize");
},
//* @protected
resizeHandler: function() {
@@ -223,7 +224,7 @@ enyo.createFromKind = function(inKind, inParam) {
// Default owner for ownerless UiComponents to allow notifying such UiComponents of important system events
// like window resize.
//
-// NOTE: ownerless UiComponents will not GC unless explicity destroyed as they will be referenced by enyo.master.
+// NOTE: ownerless UiComponents will not GC unless explicitly destroyed as they will be referenced by enyo.master.
//
enyo.master = new enyo.Component({
name: "master",
@@ -239,6 +240,7 @@ enyo.master = new enyo.Component({
// this works because master is a Component, so it' waterfalls
// to it's owned Components (i.e. master has no children)
enyo.master.waterfallDown("onresize");
+ enyo.master.waterfallDown("onpostresize");
} else {
// all other top level events are sent only to interested Signal receivers
enyo.Signals.send(inEventName, inEvent);
2  source/touch/ScrollMath.js
View
@@ -26,7 +26,7 @@ enyo.kind({
kSnapFriction: 0.9,
//* Scalar applied to 'flick' event velocity
kFlickScalar: 10,
- //* the value used in friction() to determine if the deta (e.g. y - y0) is close enough to zero to consider as zero.
+ //* the value used in friction() to determine if the delta (e.g. y - y0) is close enough to zero to consider as zero.
kFrictionEpsilon: 1e-2,
//* top snap boundary, generally 0
topBoundary: 0,
2  source/touch/ScrollStrategy.js
View
@@ -119,7 +119,7 @@ enyo.kind({
},
// NOTE: mobile native scrollers need touchmove. Indicate this by
// setting the requireTouchmove property to true (must do this in move event
- // becuase must respond to first move or native action fails).
+ // because must respond to first move or native action fails).
move: function(inSender, inEvent) {
var dy = inEvent.pageY - this.downY;
var dx = inEvent.pageX - this.downX;
4 source/touch/touch.js
View
@@ -13,7 +13,7 @@ enyo.requiresWindow(function() {
this.excludedTarget = null;
var e = this.makeEvent(inEvent);
gesture.down(e);
- // generate a new event obect since over is a different event
+ // generate a new event object since over is a different event
e = this.makeEvent(inEvent);
this.overEvent = e;
gesture.over(e);
@@ -98,7 +98,7 @@ enyo.requiresWindow(function() {
enyo.forEach(['ontouchstart', 'ontouchmove', 'ontouchend', 'ongesturestart', 'ongesturechange', 'ongestureend'], function(e) {
document[e] = enyo.dispatch;
});
- // use proper target finding technqiue based on feature detection.
+ // use proper target finding technique based on feature detection.
if (!document.elementFromPoint) {
this.findTarget = function(inX, inY) {
return this.findTargetTraverse(null, inX, inY);
4 tools/minifier/minify.js
View
@@ -132,6 +132,10 @@ finish = function(loader) {
//w('');
//
var output = opt.output || "build";
+ var outfolder = path.dirname(output);
+ if (outfolder != ".") {
+ fs.mkdirSync(outfolder);
+ }
//
var css = concatCss(loader);
if (css.length) {
Please sign in to comment.
Something went wrong with that request. Please try again.