You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/12/17 01:08:03 UTC
[1/6] git commit: [flex-asjs] [refs/heads/develop] - fix test of
interface impl
Repository: flex-asjs
Updated Branches:
refs/heads/develop 28bdfd5eb -> 23b46651f
fix test of interface impl
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d0a66ff5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d0a66ff5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d0a66ff5
Branch: refs/heads/develop
Commit: d0a66ff5be5f839e879fd13a40cdd9acdab95a04
Parents: 2fa58c4
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 15:48:40 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:56 2014 -0800
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d0a66ff5/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
index 42c7fd0..63b2d19 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -52,7 +52,7 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject =
generateMXMLObject =
org.apache.flex.utils.MXMLDataInterpreter.generateMXMLObject;
- if (comp.set_strand)
+ if (comp.addBead)
org.apache.flex.utils.MXMLDataInterpreter.initializeStrandBasedObject(document, null, comp, data, i);
else {
m = data[i++]; // num props
[5/6] git commit: [flex-asjs] [refs/heads/develop] - fix style
handling
Posted by ah...@apache.org.
fix style handling
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6df49095
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6df49095
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6df49095
Branch: refs/heads/develop
Commit: 6df490955f5db4e911d56f893c0d6af9a02a347d
Parents: 2523dd9
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 15:46:51 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:56 2014 -0800
----------------------------------------------------------------------
.../org/apache/flex/core/SimpleCSSValuesImpl.js | 56 +++++++++++---------
1 file changed, 32 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6df49095/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
index 8fa8079..e8ea5c8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -253,8 +253,11 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
obj[pieces[0]] = false;
else {
var n = Number(value);
- if (isNaN(n))
+ if (isNaN(n)) {
+ if (value.indexOf("'") == 0)
+ value = value.substring(1, value.length - 1);
obj[pieces[0]] = value;
+ }
else
obj[pieces[0]] = n;
}
@@ -266,14 +269,23 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
/**
* The styles that apply to each UI widget
*/
-org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles =
- ['backgroundColor',
- 'backgroundImage',
- 'color',
- 'fontFamily',
- 'fontWeight',
- 'fontSize',
- 'fontStyle'];
+org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles = {
+ backgroundColor : 1,
+ backgroundImage : 1,
+ color : 1,
+ fontFamily : 1,
+ fontWeight : 1,
+ fontSize : 1,
+ fontStyle : 1
+};
+
+/**
+ * The styles that use color format #RRGGBB
+ */
+org.apache.flex.core.SimpleCSSValuesImpl.colorStyles = {
+ backgroundColor : 1,
+ color : 1
+};
/**
@@ -283,20 +295,16 @@ org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles =
org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyles =
function(thisObject, styles) {
var styleList = org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles;
- var n = styleList.length;
- for (var i = 0; i < n; i++) {
- this.applyStyle(thisObject, styleList[i]);
+ var colorStyles = org.apache.flex.core.SimpleCSSValuesImpl.colorStyles;
+ for (var p in styles) {
+ //if (styleList[p])
+ var value = styles[p];
+ if (typeof(value) == "number") {
+ if (colorStyles[p])
+ value = "#" + value.toString(16);
+ else
+ value = value.toString() + "px";
+ }
+ thisObject.element.style[p] = value;
}
};
-
-
-/**
- * @param {Object} thisObject The object to apply styles to;
- * @param {string} style The style name.
- */
-org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyle =
- function(thisObject, style) {
- var value = this.getValue(thisObject, style);
- if (value !== undefined)
- thisObject.element.style[style] = value;
-};
\ No newline at end of file
[6/6] git commit: [flex-asjs] [refs/heads/develop] - lint
Posted by ah...@apache.org.
lint
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/23b46651
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/23b46651
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/23b46651
Branch: refs/heads/develop
Commit: 23b46651fe652a85233987d00291ecd8815ee555
Parents: d0a66ff
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 16:00:41 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:57 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/core/Application.js | 2 +-
.../org/apache/flex/core/SimpleCSSValuesImpl.js | 31 ++++++++++----------
2 files changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23b46651/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index 744cc2d..b6b2dae 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -82,7 +82,7 @@ org.apache.flex.core.Application.prototype.set_valuesImpl =
org.apache.flex.core.Application.prototype.start = function() {
this.element = document.getElementsByTagName('body')[0];
this.element.flexjs_wrapper = this;
- this.element.className = "Application";
+ this.element.className = 'Application';
org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.get_MXMLDescriptor());
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23b46651/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
index e8ea5c8..25b953d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -254,10 +254,10 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
else {
var n = Number(value);
if (isNaN(n)) {
- if (value.indexOf("'") == 0)
+ if (value.indexOf("'") === 0)
value = value.substring(1, value.length - 1);
obj[pieces[0]] = value;
- }
+ }
else
obj[pieces[0]] = n;
}
@@ -270,21 +270,22 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
* The styles that apply to each UI widget
*/
org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles = {
- backgroundColor : 1,
- backgroundImage : 1,
- color : 1,
- fontFamily : 1,
- fontWeight : 1,
- fontSize : 1,
- fontStyle : 1
+ backgroundColor: 1,
+ backgroundImage: 1,
+ color: 1,
+ fontFamily: 1,
+ fontWeight: 1,
+ fontSize: 1,
+ fontStyle: 1
};
+
/**
* The styles that use color format #RRGGBB
*/
org.apache.flex.core.SimpleCSSValuesImpl.colorStyles = {
- backgroundColor : 1,
- color : 1
+ backgroundColor: 1,
+ color: 1
};
@@ -299,12 +300,12 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyles =
for (var p in styles) {
//if (styleList[p])
var value = styles[p];
- if (typeof(value) == "number") {
+ if (typeof(value) == 'number') {
if (colorStyles[p])
- value = "#" + value.toString(16);
+ value = '#' + value.toString(16);
else
- value = value.toString() + "px";
- }
+ value = value.toString() + 'px';
+ }
thisObject.element.style[p] = value;
}
};
[2/6] git commit: [flex-asjs] [refs/heads/develop] - get descriptor
correctly
Posted by ah...@apache.org.
get descriptor correctly
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2fa58c49
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2fa58c49
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2fa58c49
Branch: refs/heads/develop
Commit: 2fa58c49905471ffd51ff4050ef8683682bbcd03
Parents: 6df4909
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 15:47:14 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:56 2014 -0800
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2fa58c49/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
index 17997cf..ac42291 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ViewBase.js
@@ -104,6 +104,15 @@ org.apache.flex.core.ViewBase.prototype.document = null;
/**
* @expose
+ * @return {Array} An array of descriptors.
+ */
+org.apache.flex.core.ViewBase.prototype.get_MXMLDescriptor = function() {
+ return this.MXMLDescriptor;
+};
+
+
+/**
+ * @expose
* @param {Object} doc The document.
* @param {Array} desc The descriptor data;
*/
[3/6] git commit: [flex-asjs] [refs/heads/develop] - wonder why this
was 25 high
Posted by ah...@apache.org.
wonder why this was 25 high
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/59ab1438
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/59ab1438
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/59ab1438
Branch: refs/heads/develop
Commit: 59ab143879eebdbe8f1eac83cf69b1fd1090c0a6
Parents: 28bdfd5
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 15:45:21 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:56 2014 -0800
----------------------------------------------------------------------
examples/FlexJSStore/src/HomeView.mxml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/59ab1438/examples/FlexJSStore/src/HomeView.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/HomeView.mxml b/examples/FlexJSStore/src/HomeView.mxml
index be34beb..12caf0e 100755
--- a/examples/FlexJSStore/src/HomeView.mxml
+++ b/examples/FlexJSStore/src/HomeView.mxml
@@ -104,9 +104,9 @@ Width and height are hard-coded in the root tag to help the Design view.
<basic:SimpleCSSStyles horizontalAlign="left" verticalAlign="middle" />
</basic:style>
<basic:TextInput height="20" width="40"/>
- <basic:HRule width="8" height="25"/>
+ <basic:HRule width="8" height="2"/>
<basic:TextInput height="20" width="40"/>
- <basic:HRule width="8" height="25"/>
+ <basic:HRule width="8" height="2"/>
<basic:TextInput height="20" width="40"/>
</basic:HContainer>
[4/6] git commit: [flex-asjs] [refs/heads/develop] - set className so
CSS will apply
Posted by ah...@apache.org.
set className so CSS will apply
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2523dd9c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2523dd9c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2523dd9c
Branch: refs/heads/develop
Commit: 2523dd9c3e3a789f86620f07a60ddacf66e8d2c4
Parents: 59ab143
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 15:45:58 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:56 2014 -0800
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/Application.js | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2523dd9c/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index 2137e7b..744cc2d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -82,6 +82,7 @@ org.apache.flex.core.Application.prototype.set_valuesImpl =
org.apache.flex.core.Application.prototype.start = function() {
this.element = document.getElementsByTagName('body')[0];
this.element.flexjs_wrapper = this;
+ this.element.className = "Application";
org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.get_MXMLDescriptor());