You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/02/27 16:43:56 UTC
[1/7] git commit: [flex-asjs] [refs/heads/develop] - - renamed and
moved the SVG asset for the TextButton class - changed the syntax for the
'clickHandler' property assignment
Repository: flex-asjs
Updated Branches:
refs/heads/develop 748afe7f0 -> 0113a8cd3
- renamed and moved the SVG asset for the TextButton class
- changed the syntax for the 'clickHandler' property assignment
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0113a8cd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0113a8cd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0113a8cd
Branch: refs/heads/develop
Commit: 0113a8cd319ffc9c3a84cb87496a007daeaf17f9
Parents: f37cf6b
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 16:43:24 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
.../flex/svg/staticControls/TextButton.js | 10 +-
.../staticControls/assets/TextButton_Skin.svg | 279 +++++++++++++++++++
.../svg/staticControls/skins/TextButtonSkin.svg | 279 -------------------
3 files changed, 286 insertions(+), 282 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0113a8cd/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
index 96ac6d5..5b7fe18 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
@@ -45,7 +45,7 @@ org.apache.flex.svg.staticControls.TextButton.prototype.FLEXJS_CLASS_INFO =
org.apache.flex.svg.staticControls.TextButton.prototype.createElement =
function() {
this.element = document.createElement('embed');
- this.element.setAttribute('src', 'org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg');
+ this.element.setAttribute('src', 'org/apache/flex/svg/staticControls/assets/TextButton_Skin.svg');
this.positioner = this.element;
@@ -64,8 +64,12 @@ org.apache.flex.svg.staticControls.TextButton.prototype.finalizeElement =
/* As we are assigning an actual function object instead of just the name,
make sure to use a unique name ('clickHandler') instead of a native
- name, like 'click' or 'onclick'. */
- this.element.clickHandler = listenersArray[0].listener;
+ name, like 'click' or 'onclick'.
+
+ Note: use array notation for property assignment so the compiler doesn't
+ rename the property ;-)
+ */
+ this.element['clickHandler'] = listenersArray[0].listener;
}
};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0113a8cd/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/assets/TextButton_Skin.svg
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/assets/TextButton_Skin.svg b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/assets/TextButton_Skin.svg
new file mode 100644
index 0000000..7986725
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/assets/TextButton_Skin.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="button" width="100%" height="100%"
+ onload="return init(evt)"
+ onmouseover="return handleMouseOver(evt)"
+ onmousedown="return handleMouseDown(evt)"
+ onmouseup="return handleMouseUp(evt)"
+ onmouseout="return handleMouseOut(evt)"
+ onclick="handleOnClick(evt)"
+ >
+ <style type="text/css">
+ .button {cursor: pointer;}
+ </style>
+
+ <script type="text/ecmascript">
+ <![CDATA[
+
+ var labelStr = "";
+ var clickHandler;
+
+ function init(event)
+ {
+ //Set Initial button state
+ document.getElementById("button_up").style.display="inline";
+ document.getElementById("button_over").style.display="none";
+ document.getElementById("button_down").style.display="none";
+
+ //Set label from the embed's frameElement.attributes values
+ labelStr = window.frameElement.attributes["label"].value;
+ var labelElement = document.getElementById("labelDisplay");
+ labelElement.firstChild.nodeValue = labelStr;
+
+ //Store callbacks
+ clickHandler = window.frameElement.clickHandler;
+ }
+
+ function handleMouseOver(event)
+ {
+ document.getElementById("button_up").style.display="none";
+ document.getElementById("button_over").style.display="inline";
+ document.getElementById("button_down").style.display="none";
+ }
+
+ function handleMouseDown(event)
+ {
+ document.getElementById("button_up").style.display="none";
+ document.getElementById("button_over").style.display="none";
+ document.getElementById("button_down").style.display="inline";
+ }
+
+ function handleMouseUp(event)
+ {
+ document.getElementById("button_up").style.display="none";
+ document.getElementById("button_over").style.display="inline";
+ document.getElementById("button_down").style.display="none";
+ }
+
+ function handleMouseOut(event)
+ {
+ document.getElementById("button_up").style.display="inline";
+ document.getElementById("button_over").style.display="none";
+ document.getElementById("button_down").style.display="none";
+ }
+
+ function handleOnClick(evt)
+ {
+ clickHandler(evt,this);
+ }
+
+ ]]></script>
+ <svg xmlns="http://www.w3.org/2000/svg" id="button_up" width="100%" height="100%" version="1.1" >
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientx63x32" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
+ <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x32)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientx63x54" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.85" />
+ <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.85" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x54)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
+ <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
+ <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
+ <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x76)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientx63x100" gradientTransform="rotate(90)">
+ <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.33" />
+ <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.33" />
+ <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x100)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#FFFFFF" />
+ <stop offset="1" stop-color="#D8D8D8" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x129)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
+ <defs>
+ <linearGradient id="button_up_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
+ <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
+ </linearGradient>
+ </defs>
+ <rect id="button_up_border" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x205)" />
+ </svg>
+ </svg>
+
+ <svg xmlns="http://www.w3.org/2000/svg" id="button_over" width="100%" height="100%" version="1.1" >
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientx63x32" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
+ <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x32)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientx63x54" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#BBBDBD" stop-opacity="0.85" />
+ <stop offset="1" stop-color="#9FA0A1" stop-opacity="0.85" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x54)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
+ <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
+ <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
+ <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x76)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientx63x100" gradientTransform="rotate(90)">
+ <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.22" />
+ <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.22" />
+ <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x100)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.22" />
+ <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.22" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x129)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
+ <defs>
+ <linearGradient id="button_over_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
+ <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
+ </linearGradient>
+ </defs>
+ <rect id="button_over_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x205)" />
+ </svg>
+ </svg>
+ <svg xmlns="http://www.w3.org/2000/svg" id="button_down" width="100%" height="100%" version="1.1" >
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientx63x32" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#FFFFFF" stop-opacity="0" />
+ <stop offset="1" stop-color="#FFFFFF" stop-opacity="0.5" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x32)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientx63x54" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#AAAAAA" stop-opacity="0.85" />
+ <stop offset="1" stop-color="#929496" stop-opacity="0.85" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x54)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
+ <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
+ <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
+ <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x76)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientx63x100" gradientTransform="rotate(90)">
+ <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.12" />
+ <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.12" />
+ <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x100)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientStrokex63x149" gradientTransform="rotate(90)">
+ <stop offset="0.0" stop-color="#000000" stop-opacity="0.25" />
+ <stop offset="0.001" stop-color="#000000" stop-opacity="0.25" />
+ <stop offset="0.0011" stop-color="#000000" stop-opacity="0.07" />
+ <stop offset="0.965" stop-color="#000000" stop-opacity="0.07" />
+ <stop offset="0.9651" stop-color="#000000" stop-opacity="0.00" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_hldownstroke1" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x149)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="2" right="2" top="2" bottom="2">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientStrokex63x182" gradientTransform="rotate(90)">
+ <stop offset="0.0" stop-color="#000000" stop-opacity="0.09" />
+ <stop offset="0.0001" stop-color="#000000" stop-opacity="0.00" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_hldownstroke2" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x182)" />
+ </svg>
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
+ <defs>
+ <linearGradient id="button_down_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
+ <stop offset="0" stop-color="#000000" stop-opacity="0.6375" />
+ <stop offset="1" stop-color="#000000" stop-opacity="0.85" />
+ </linearGradient>
+ </defs>
+ <rect id="button_down_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x205)" />
+ </svg>
+ </svg>
+ <svg id="labelDisplaySVG" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" version="1.1" >
+ <text id="labelDisplay" text-anchor="middle" font-family="verdana" font-size="12" dy=".3em" x="50%" y="50%" > </text>
+ </svg>
+ <rect id="mouse_catcher" width="100%" height="100%" fill="none" pointer-events="all"/>
+</svg>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0113a8cd/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
deleted file mode 100644
index 7986725..0000000
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="button" width="100%" height="100%"
- onload="return init(evt)"
- onmouseover="return handleMouseOver(evt)"
- onmousedown="return handleMouseDown(evt)"
- onmouseup="return handleMouseUp(evt)"
- onmouseout="return handleMouseOut(evt)"
- onclick="handleOnClick(evt)"
- >
- <style type="text/css">
- .button {cursor: pointer;}
- </style>
-
- <script type="text/ecmascript">
- <![CDATA[
-
- var labelStr = "";
- var clickHandler;
-
- function init(event)
- {
- //Set Initial button state
- document.getElementById("button_up").style.display="inline";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="none";
-
- //Set label from the embed's frameElement.attributes values
- labelStr = window.frameElement.attributes["label"].value;
- var labelElement = document.getElementById("labelDisplay");
- labelElement.firstChild.nodeValue = labelStr;
-
- //Store callbacks
- clickHandler = window.frameElement.clickHandler;
- }
-
- function handleMouseOver(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="inline";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleMouseDown(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="inline";
- }
-
- function handleMouseUp(event)
- {
- document.getElementById("button_up").style.display="none";
- document.getElementById("button_over").style.display="inline";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleMouseOut(event)
- {
- document.getElementById("button_up").style.display="inline";
- document.getElementById("button_over").style.display="none";
- document.getElementById("button_down").style.display="none";
- }
-
- function handleOnClick(evt)
- {
- clickHandler(evt,this);
- }
-
- ]]></script>
- <svg xmlns="http://www.w3.org/2000/svg" id="button_up" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
- </linearGradient>
- </defs>
- <rect id="button_up_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.85" />
- <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_up_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_up_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.33" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.33" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_up_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_up_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_up_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" />
- <stop offset="1" stop-color="#D8D8D8" />
- </linearGradient>
- </defs>
- <rect id="button_up_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x129)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_up_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
- </linearGradient>
- </defs>
- <rect id="button_up_border" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_up_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
-
- <svg xmlns="http://www.w3.org/2000/svg" id="button_over" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.01" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.07" />
- </linearGradient>
- </defs>
- <rect id="button_over_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#BBBDBD" stop-opacity="0.85" />
- <stop offset="1" stop-color="#9FA0A1" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_over_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_over_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_over_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_over_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_over_idLinearGradientStrokex63x129" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.22" />
- <stop offset="1" stop-color="#D8D8D8" stop-opacity="0.22" />
- </linearGradient>
- </defs>
- <rect id="button_over_highlightStroke" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x129)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_over_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.5625" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.75" />
- </linearGradient>
- </defs>
- <rect id="button_over_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_over_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
- <svg xmlns="http://www.w3.org/2000/svg" id="button_down" width="100%" height="100%" version="1.1" >
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="-1" right="-1" top="-1" bottom="-1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x32" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0" />
- <stop offset="1" stop-color="#FFFFFF" stop-opacity="0.5" />
- </linearGradient>
- </defs>
- <rect id="button_down_shadow" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x32)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x54" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#AAAAAA" stop-opacity="0.85" />
- <stop offset="1" stop-color="#929496" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_down_fill" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x54)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x76" x1="0%" y1="100%" x2="0%" y2="0%">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.0627" />
- <stop offset="0.48" stop-color="#000000" stop-opacity="0.0099" />
- <stop offset="0.48001" stop-color="#000000" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_down_lowlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x76)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientx63x100" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#FFFFFF" stop-opacity="0.12" />
- <stop offset="0.48" stop-color="#FFFFFF" stop-opacity="0.12" />
- <stop offset="0.48001" stop-color="#FFFFFF" stop-opacity="0" />
- </linearGradient>
- </defs>
- <rect id="button_down_highlight" rx="2" ry="2" width="100%" height="100%" style="fill:url(#button_down_idLinearGradientx63x100)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="1" right="1" top="1" bottom="1">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x149" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.25" />
- <stop offset="0.001" stop-color="#000000" stop-opacity="0.25" />
- <stop offset="0.0011" stop-color="#000000" stop-opacity="0.07" />
- <stop offset="0.965" stop-color="#000000" stop-opacity="0.07" />
- <stop offset="0.9651" stop-color="#000000" stop-opacity="0.00" />
- </linearGradient>
- </defs>
- <rect id="button_down_hldownstroke1" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x149)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="2" right="2" top="2" bottom="2">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x182" gradientTransform="rotate(90)">
- <stop offset="0.0" stop-color="#000000" stop-opacity="0.09" />
- <stop offset="0.0001" stop-color="#000000" stop-opacity="0.00" />
- </linearGradient>
- </defs>
- <rect id="button_down_hldownstroke2" rx="2" ry="2" width="100%" height="100%" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x182)" />
- </svg>
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" left="0" right="0" top="0" bottom="0">
- <defs>
- <linearGradient id="button_down_idLinearGradientStrokex63x205" gradientTransform="rotate(90)">
- <stop offset="0" stop-color="#000000" stop-opacity="0.6375" />
- <stop offset="1" stop-color="#000000" stop-opacity="0.85" />
- </linearGradient>
- </defs>
- <rect id="button_down_border" width="100%" height="100%" rx="2" ry="2" fill="none" style="stroke-width:2;stroke:url(#button_down_idLinearGradientStrokex63x205)" />
- </svg>
- </svg>
- <svg id="labelDisplaySVG" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" version="1.1" >
- <text id="labelDisplay" text-anchor="middle" font-family="verdana" font-size="12" dy=".3em" x="50%" y="50%" > </text>
- </svg>
- <rect id="mouse_catcher" width="100%" height="100%" fill="none" pointer-events="all"/>
-</svg>
\ No newline at end of file
[6/7] git commit: [flex-asjs] [refs/heads/develop] - Updated type
annotation and member initialisation to allow for NULL,
preventing the triggering of the new method for all components.
Posted by er...@apache.org.
Updated type annotation and member initialisation to allow for NULL, preventing the triggering of the new method for all components.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f37cf6b4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f37cf6b4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f37cf6b4
Branch: refs/heads/develop
Commit: f37cf6b48f0449de83b9b6197d99daab5c917f18
Parents: b6a5965
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 13:22:18 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f37cf6b4/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index b426af6..d331fe2 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -84,8 +84,9 @@ org.apache.flex.core.UIBase.prototype.createElement = function() {
/**
* @protected
+ * @type {?function()}
*/
-org.apache.flex.core.UIBase.prototype.finalizeElement = goog.nullFunction();
+org.apache.flex.core.UIBase.prototype.finalizeElement = null;
/**
[2/7] git commit: [flex-asjs] [refs/heads/develop] - Fixed Closure
warning caused by this hack; Fixed some more JSDoc.
Posted by er...@apache.org.
Fixed Closure warning caused by this hack; Fixed some more JSDoc.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b6a59655
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b6a59655
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b6a59655
Branch: refs/heads/develop
Commit: b6a596550b5594dc60d3ad5c82503d9c8a300cdf
Parents: dcbeeb8
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 13:14:11 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b6a59655/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index 2c7a23c..154c7e8 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -158,13 +158,14 @@ org.apache.flex.core.HTMLElementWrapper.prototype.set_strand =
* @return {Object} The wrapping object.
*/
Event.prototype.get_target = function() {
- var obj = this.target.flexjs_wrapper;
+ var obj = this.target['flexjs_wrapper'];
return obj;
};
/**
- Hack to allow event.target expressions to work
+ * Hack to allow event.target expressions to work
+ *
* @expose
* @return {Object} The wrapping object.
*/
[5/7] git commit: [flex-asjs] [refs/heads/develop] - Events are added
after the component is created (MXMLDataInterpreter),
so anything that relies on data about events - like the new SVG event protocol
- needs to have a handler that is triggered after t
Posted by er...@apache.org.
Events are added after the component is created (MXMLDataInterpreter), so anything that relies on data about events - like the new SVG event protocol - needs to have a handler that is triggered after the component is completely initialised.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/840bda96
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/840bda96
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/840bda96
Branch: refs/heads/develop
Commit: 840bda9664f4d11bcb0284b9e2cae12943be33a7
Parents: ca8f560
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 12:32:15 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js | 6 ++++++
.../js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js | 4 ++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/840bda96/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
index d8043f0..b426af6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/UIBase.js
@@ -83,6 +83,12 @@ org.apache.flex.core.UIBase.prototype.createElement = function() {
/**
+ * @protected
+ */
+org.apache.flex.core.UIBase.prototype.finalizeElement = goog.nullFunction();
+
+
+/**
* @param {Object} c The child element.
*/
org.apache.flex.core.UIBase.prototype.addElement = function(c) {
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/840bda96/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 c1f9913..9bfd00d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/MXMLDataInterpreter.js
@@ -281,6 +281,10 @@ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray =
comp.setDocument(document, id);
}
+ if (goog.isFunction(comp.finalizeElement)) {
+ comp.finalizeElement();
+ }
+
comps.push(comp);
}
[4/7] git commit: [flex-asjs] [refs/heads/develop] - Fix type warning
and fix JSDoc notation.
Posted by er...@apache.org.
Fix type warning and fix JSDoc notation.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8aadaec0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8aadaec0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8aadaec0
Branch: refs/heads/develop
Commit: 8aadaec0383b7e9cfc847471b4d45815622c7bee
Parents: 748afe7
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 12:24:26 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8aadaec0/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
index 8e67a95..2c7a23c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/HTMLElementWrapper.js
@@ -43,7 +43,7 @@ org.apache.flex.core.HTMLElementWrapper.prototype.FLEXJS_CLASS_INFO =
/**
* @expose
- * @type {Object}
+ * @type {EventTarget}
*/
org.apache.flex.core.HTMLElementWrapper.prototype.element = null;
@@ -152,7 +152,8 @@ org.apache.flex.core.HTMLElementWrapper.prototype.set_strand =
/**
- Hack to allow event.target expressions to work
+ * Hack to allow event.target expressions to work
+ *
* @expose
* @return {Object} The wrapping object.
*/
[7/7] git commit: [flex-asjs] [refs/heads/develop] - Implementation
of the creation and registration of the 'click' event callback in FlexJS and
SVG.
Posted by er...@apache.org.
Implementation of the creation and registration of the 'click' event callback in FlexJS and SVG.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dcbeeb82
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dcbeeb82
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dcbeeb82
Branch: refs/heads/develop
Commit: dcbeeb823fa7f493e149a950b567fe4c9b4f2da6
Parents: 840bda9
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 12:38:25 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
.../apache/flex/svg/staticControls/TextButton.js | 17 +++++++++++++++++
.../svg/staticControls/skins/TextButtonSkin.svg | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dcbeeb82/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
index 5dba453..96ac6d5 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/TextButton.js
@@ -54,6 +54,23 @@ org.apache.flex.svg.staticControls.TextButton.prototype.createElement =
/**
+ * @override
+ */
+org.apache.flex.svg.staticControls.TextButton.prototype.finalizeElement =
+ function() {
+ var listenersArray;
+ if (goog.events.hasListener(this.element, goog.events.EventType.CLICK)) {
+ listenersArray = goog.events.getListeners(this.element, goog.events.EventType.CLICK, false);
+
+ /* As we are assigning an actual function object instead of just the name,
+ make sure to use a unique name ('clickHandler') instead of a native
+ name, like 'click' or 'onclick'. */
+ this.element.clickHandler = listenersArray[0].listener;
+ }
+};
+
+
+/**
* @expose
* @return {string} The text getter.
*/
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dcbeeb82/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
index 097965d..7986725 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
+++ b/frameworks/js/FlexJS/src/org/apache/flex/svg/staticControls/skins/TextButtonSkin.svg
@@ -48,7 +48,7 @@
labelElement.firstChild.nodeValue = labelStr;
//Store callbacks
- clickHandler = window.frameElement.attributes["onclick"].value;
+ clickHandler = window.frameElement.clickHandler;
}
function handleMouseOver(event)
@@ -81,7 +81,7 @@
function handleOnClick(evt)
{
- top[clickHandler](evt,this);
+ clickHandler(evt,this);
}
]]></script>
[3/7] git commit: [flex-asjs] [refs/heads/develop] - Remove
annotations: it is the same as in the parent class,
in which case @override takes care of inherited annotations.
Posted by er...@apache.org.
Remove annotations: it is the same as in the parent class, in which case @override takes care of inherited annotations.
Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ca8f5607
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ca8f5607
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ca8f5607
Branch: refs/heads/develop
Commit: ca8f5607f526cb77c6527a8b9fdae06e117a4322
Parents: 8aadaec
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Thu Feb 27 12:25:38 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Thu Feb 27 16:43:38 2014 +0100
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/events/EventDispatcher.js | 9 ---------
1 file changed, 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ca8f5607/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
index 7154167..03393a6 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/EventDispatcher.js
@@ -44,15 +44,6 @@ org.apache.flex.events.EventDispatcher.prototype.FLEXJS_CLASS_INFO =
/**
* @override
- * @param {string} type The type of the event to listen for.
- * @param {Function|Object} handler The function to handle the event. The
- * handler can also be an object that implements the handleEvent method
- * which takes the event object as argument.
- * @param {boolean=} opt_capture In DOM-compliant browsers, this determines
- * whether the listener is fired during the capture or bubble phase
- * of the event.
- * @param {Object=} opt_handlerScope Object in whose scope to call
- * the listener.
*/
org.apache.flex.events.EventDispatcher.prototype.addEventListener =
function(type, handler, opt_capture, opt_handlerScope) {